You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I read the docs and even searched a lot through the code, but still it's not really clear to me what exactly does the method addMedia() alone. It's almost always used together with toMediaCollection(). I understand what toMediaCollection() does, even in database, but not sure what addMedia itself does. From the code, it doesn't seem to save the record in database (that's toMediaCollection). Then maybe it somewhat 'prepares' the file data based on its origin? Anyway, in the end, what is addMedia()? It feel quite 'strange' to me to have to always call two methods instead of just one to save a media, so I'd like to know why we have to go through addMedia, what exactly this function does.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I read the docs and even searched a lot through the code, but still it's not really clear to me what exactly does the method addMedia() alone. It's almost always used together with toMediaCollection(). I understand what toMediaCollection() does, even in database, but not sure what addMedia itself does. From the code, it doesn't seem to save the record in database (that's toMediaCollection). Then maybe it somewhat 'prepares' the file data based on its origin? Anyway, in the end, what is addMedia()? It feel quite 'strange' to me to have to always call two methods instead of just one to save a media, so I'd like to know why we have to go through addMedia, what exactly this function does.
Thank you, regards
Beta Was this translation helpful? Give feedback.
All reactions