We have moved to GitHub Issues
Created by Adrian Ursu 14 Jan 2016, 09:06:22 Updated by Harvey Williams 15 Dec 2016, 16:12:42
When I try to drag and drop a PDF file (or any other file type that's not an Image), I gaet a message saying that only a these.... file types are allowed. The list of file types is limited to images
I was expected to allow me to upload the files with drag and drop
Instead, an error message was shown
You can change allowed filetypes in umbracoSettings.config: https://our.umbraco.org/Documentation/Reference/Config/umbracoSettings/
In fact, nope, that's only for images, never mind.
@sebastiaan I think you are partially right here. Adding in the
<imaging> below the
<imageFileTypes> that has the pdf value inside of it at least allows the JS to post the file to the C# that handles it.
The above link shows how the accepted files types are taken from the
<imageFileTypes> config item.
Adding PDF changes the message from (Only allowed file types are: ".jpeg,.jpg,.gif,.bmp,.png,.tiff,.tif") to (An error has occurred.).
I think the problem may be in this file:
Though the code looks fine to me on first inspection.
@sebastiaan Will this issue be solved in the finished 7.4.0 Version?? The Drag-and-Drop PDF Upload is an essential feature with a high priority!!! I´m using the RC - the issue is still there... Or do you have a solution already?
@firstname.lastname@example.org You can still upload the files individually.
PR for review: https://github.com/umbraco/Umbraco-CMS/pull/1114
Tested dragging images, pdfs and a cshtml file to the dropzone, cshtml is rejected, uses the disallowed files as a blacklist instead of imagefiles as a whitelist
@sebastiaan @pploug Thanks for the solution and the fixing. How can I fix it in my current RC-Installation? Which files do I have to update?
We're releasing 7.4 final soon, so keep an eye on https://twitter.com/umbracoproject and then you can just do a normal upgrade.
@pploug Look at this pull request: https://github.com/umbraco/Umbraco-CMS/pull/1133 I have added your fix also to the drag-drop uploader, because that is still "broken" in the 7.4.0 release.
Still a bug in media picker in 7.4.2, but code has changed in dev v7, so here's a fix if you need it until then In Umbraco\js\umbraco.controllers.js REPLACE $scope.acceptedFileTypes = mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.imageFileTypes); WITH $scope.acceptedFileTypes = mediaHelper.formatFileTypes(Umbraco.Sys.ServerVariables.umbracoSettings.disallowedUploadFiles).replace(/./g, "!.");
Looks like the bug may still be there, however, as Chris says, the code has changed: https://github.com/umbraco/Umbraco-CMS/blob/f2c406f168a65200568328fd8b69970db84e4012/src/Umbraco.Web.UI.Client/src/views/common/overlays/mediaPicker/mediapicker.controller.js#L19
Appears to be fixed in 7.5.4 (if not before).
Backwards Compatible: True
Fix Submitted: Inline code
Affected versions: 7.4.0
Due in version: 7.4.0