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.

Comments

adhariwal created an issue. See original summary.

adhariwal’s picture

StatusFileSize
new3.38 KB
balsama’s picture

Thanks for the patch! Do you have screenshots by chance that show how this changes the user interface?

adhariwal’s picture

StatusFileSize
new55.08 KB
adhariwal’s picture

Only local images are allowed.

balsama’s picture

Thanks. 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?

balsama’s picture

Just 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:

  1. Needs tests.
  2. Should be expanded to cover the upload tab of the Entity Browser.
  3. Media Reference fields that allow more than one image bundle might be covered by #2, but that should be confirmed.
balsama’s picture

Title: Bulk media upload should have an option to select the target media entity bundle. » Media upload should have an option to select the target media entity bundle.
Issue summary: View changes

Updated IS to reflect that this affects all media upload forms, including entity browsers. Not just the bulk upload form.

balsama’s picture

Status: Active » Fixed

balsama’s picture

Status: Fixed » Needs work

Reopening 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.

phenaproxima’s picture

Status: Needs work » Fixed

This is now corrected as of commit 68a3e597ad0abeac3bce189dbb6a73f030371aeb. Marking as fixed.

  • bendeguz.csirmaz authored 24625b0 on 8.x-2.x
    Issue #2969541 by adhariwal, bendeguz.csirmaz, phenaproxima: Media...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jmuzz’s picture

Still 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.