U4-4196 - U7 - Umbraco HTML5 Drop Zone should honor media types

Created by Jeavon Leopold 07 Feb 2014, 10:40:47 Updated by Claus Jensen 14 Nov 2016, 08:59:36

Tags: Up For Grabs PR Community Contrib

Is duplicated by: U4-7515

Relates to: U4-6830

If you drag a image into a HTML5 drop zone, the created type should be allowed within the folder type. Currently the image is always created as type "Image" even if that isn't a allowed type of the folder.

An ideal solution might be for a media type to have a default child type (like the Structure Extensions package), the drag and drop would then use this type when creating a new item. This would allow the drag and drop to create new media items with additional properties etc...


Shannon Deminick 19 May 2016, 09:42:39


To fix this here is my proposal which i think is the simplest solution:

  • When the folder is loaded in the UI - before the user drags files onto it - we will check for any child media types of the current folder that contains either an upload or a cropper
  • If there is only one found, this will be the media type used for drag drop
  • If there is more than one type found, we will retain this information for when the user drops files
  • Upon dropping files, if there is more than one type found we will display a prompt to the user to select the type to be used for all current file transfers. If there is only one type, we will just use that without any prompting

Gerard Konings 20 May 2016, 13:19:11

I'm all up for it. Have some ideas about it. Submitted a first PR, work-in-progress https://github.com/umbraco/Umbraco-CMS/pull/1271

Gerard Konings 17 Jun 2016, 12:52:50

Almost done.

2 things that still need to be done.

  • Get it working on the mediapicker views
  • Get it working serverside

For the serverside implementation I need some help. I fear the mediatype upload is hardcoded as "Image" and I cannot make any sense of the code (I'm not the best back-ender). So if someone else could have a look at that, that would be great.

Zac 08 Aug 2016, 20:36:12

Any update on this? Is this still scheduled to be part of 7.5.0?

Shannon Deminick 09 Aug 2016, 06:06:36


We will schedule this for 7.5.1, it is too late to get this in for 7.5.0 since we are feature locked and in testing mode now. We will need to work further with @gkonings on updating his PR to be fully complete, we'll schedule some time for that in the coming weeks.

Gerard Konings 09 Aug 2016, 06:20:48

I'm still waiting for a review on my last code. The PR is there. After that there's only some small front-end work to be done. On the other hand, there's still the back-end stuff to do. I can't do that. So if someone knows how to fix the back-end part, much appreciated.

On a final note. I'm trying to get it done this month. I'm starting a new job in september and that also means I won't be working with Umbraco for while since I will trade my windows machine for a macbook (maybe I will return later, who knows. Umbraco is still the best part of .Net).

Shannon Deminick 09 Aug 2016, 06:39:02

Yup we'll be getting back to this PR as soon as we can, there's been a lot of work leading up to 7.5 so we've had to trim back some of the features that will make the final release but 7.5.1 won't be too far away and we'll certainly be getting this reviewed, updated and merged for that release :) We'll of course help with all the back end stuff too and be sure this is all done within your month. We really appreciate your help with all of this and good luck with the new job + mac :)

Jack Lawry 19 Aug 2016, 17:24:48

Any idea when this will be released? - I know you have only just released v7.5.0 but keen to get this sorted.

Shannon Deminick 19 Aug 2016, 23:09:15

It's tagged for 7.5.1 so hopefully by then if everything is working as it should

Silvan Egger 23 Aug 2016, 13:31:21

@Shandem Meanwhile it's tagged for 7.5.3 but at the umbraco release page there's no version 7.5.3 in progress. do you have some more information about this? https://our.umbraco.org/contribute/progress

Sebastiaan Janssen 23 Aug 2016, 13:38:59

Hi @silvanegger ! 7.5.3 is very much in progress, I just forgot to add it to the overview, sorry about that: https://our.umbraco.org/contribute/releases/753 It's the same schedule 7.5.1 has before, release is planned mid Sept.

7.5.1 and 7.5.2 were tiny releases to fix some critical bugs, we didn't have time to include new features in this version.

Gerard Konings 30 Aug 2016, 09:31:24

Made a final commit. I think all the front-end work is done, but ofcourse you should check :)

Sebastiaan Janssen 04 Sep 2016, 11:35:49

Update: unfortunately we found a few more high-priority bugs and a 7.5.3 release is coming soon, we won't be able to fit this in again, sorry. I have not set a date for the 7.5.4 release yet but I expect it will be late September or early October.

Silvan Egger 18 Oct 2016, 20:34:24

You just changed this Issue to be Due in version 7.5.5. When would you estimate 7.5.5 to be released? And do you really think now this Issue will be done in 7.5.5?

Shannon Deminick 19 Oct 2016, 09:29:55

We cannot postpone 7.5.4, there is still some remaining work to do on this task which we do not currently have time for. We generally try to release patch versions every 4-6 weeks.

Mads Rasmussen 03 Nov 2016, 11:16:38

Thanks to @gkonings for his PR. It works really well. I have had to do some manually merging and some small fixes to get the PR ready for review.

PR: https://github.com/umbraco/Umbraco-CMS/pull/1572

What this PR includes and what to test:

  • If no media types are allowed. The dropzone will not be shown.
  • If one media type is allowed. This will be chosen and all files uploaded will have this media type.
  • If multiple media types are allowed, on upload a dialog will be shown with the available media types, which have an Image Cropper and/or Upload editor. This media type will apply to all files in the current upload sessions. When new files are dropped the dialog will show again.
  • The default Image and File media types are now “allowed at root” as default to make the upload field visible in the media section root.
  • Please test both media section and media pickers.

Mads Rasmussen 10 Nov 2016, 12:16:29

After some feedback we have made the following update to the PR:

The problem: For a standard Umbraco setup the user will have to choose between the “Image" and “File” media type because more than one media type is allowed in the media root and in folders.

The solution: If no custom media types, which includes an Image Cropper, are added we will fall back to let Umbraco pick the best suited media type (“Image or “File”).

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions:

Due in version: 7.5.5

Sprint: Sprint 46

Story Points: