Upload media without related to specific model #3479
Unanswered
AmooEbrahim
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Myabe it is old question but I want to ask in this discussion, maybe it can help us.
I am using latest version (10.15) of Spatie/laravel-medialibrary.
It is very simple to upload media rlated to a model, look like this:
$model->addMediaFromRequest('file');
or in other ways.
But, now I want to put some files without related to any model instance.
As mentioned in this issue #1443, but it isn't merged because of some other problems.
It is okay to use other strategies like using dump model instance, but it is good to know if there is any way to do my desire.
Anyhow, if you know how I resolve this problem I appreciate you to increase developers' society knowledge.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions