Currently media upload (on bulk upload for or upload tab from media or image entity browser) does not support to select the target media bundle and relies on the MIME type of the uploaded files. It works fine in most of the case but does not work as expected when there are two media bundles use same source (e.g. image). Let's consider this scenario:
I have to media bundles
- Banners (Image as selected Media source)
- Image (Image as selected Media source) comes default
In above scenario when someone tries to bulk upload images it goes to `Banners` bundle instead of `Image` this happens due to ksort on bundles array.
The propose solution for this to have a Media bundle select box in the bulk media upload form itself.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2969541_4.png | 55.08 KB | adhariwal |
| #2 | 2969541-2-lightning_bulk_upload_form.patch | 3.38 KB | adhariwal |
Comments
Comment #2
adhariwal commentedComment #3
balsamaThanks for the patch! Do you have screenshots by chance that show how this changes the user interface?
Comment #4
adhariwal commentedComment #5
adhariwal commentedComment #6
balsamaThanks. Wouldn't this problem also exist in the upload widget tab of the Media Library entity browser? @phenaproxima, how does Lightning currently disambiguate when there is more than one image media? Or is having more than one incompatible?
Comment #7
balsamaJust want to reiterate a big +1 from me for this. Thanks @adhariwal. I haven't reviewed the patch, but some notes on what will need to happen before this is committed:
Comment #8
balsamaUpdated IS to reflect that this affects all media upload forms, including entity browsers. Not just the bulk upload form.
Comment #11
balsamaComment #13
balsamaReopening for now because I don't see how this works with bulk upload or media reference fields. It only appears to work with CKEditor integration.
Comment #14
phenaproximaThis is now corrected as of commit 68a3e597ad0abeac3bce189dbb6a73f030371aeb. Marking as fixed.
Comment #17
jmuzz commentedStill need to apply #2 to have the option on the bulk upload form. I can't use the bulk upload form for images without it for the reasons explained by the issue and patch creator.