-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
10.3.0-RC: Image upload skips select media ContentType #13210
Comments
Hi there @rammi987! Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better. We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Hi @rammi987 thanks for your feedback and your suggested fix. We are going to revamp/refactor the dropzone directive into using our newer drag&drop functionality which was built for the Media Picker property editor with #13393. This is currently being tracked internally at HQ and we will provide a fix. Internal ref: AB#24262 |
@iOvergaard how far along is this fix ? We would have expected it to be included in the 11.1 release at least. |
Hi @sniffdk Sorry that the fix was not released when you expected it to be. The bug report will get a label like "release-11.x.x" when we know which version it will target. Regarding your description of SVGs being uploaded as images, I cannot see a correlation between the original bug report and what you describe. It rather sounds like you have found another bug. Looking in the issue tracker, it would seem there has been a few issues surrounding SVGs - mainly that they were uploaded as the 'File' type #10320 and then later the 'SVG' type was added #10604. Disregarding the fact that the media type picker dialog does not work at the moment, SVGs should still work if there is only one SVG type. Do you allow SVGs on more than one media type? Regarding your description of uploading arbitrary files such as DLLs and executables, I am going to make a bug report regarding this on your behalf, so we can look into that. |
Hi @iOvergaard Thanks for getting back to me. This bug repport states that: This is consistent with what we are experiencing. And yes, we allow svg's on more than one media type, hence why we need the media type picker to actually work 😄 Thanks for creating the bug rapport for me, it's appreciated 😃 |
I hear what you are saying. I believe the media library should at least pick the first relevant media type (which would be Vector Graphics (SVG) in your case) even though the "choose a type" dialog does not work, but as I understand it from your description it does not even do that hence the new bug report. This bug report remains on our board and will be fixed as soon as possible. |
It does actually just select the first relevant media type, which for svg is the build-in Image media type, that uses the Image Cropper data type. I assume that svg, as an allowed file extension, is hardcoded into that data type somewhere. The problem here being that the dialog doesn't work, so we can't choose to upload the svg as any other media type, when more than one is allowed to be created under the Folder media type. I do hope we can have a fix for this in the next minor release 👍 |
@sniffdk Interesting 🤔 It seems like the frontend falls back to type=Image whenever it can't determine it automatically. SVGs then sort of work with the Image type (at least the preview works) and you might not notice anything wrong. I just did a test and found that if the dialog works and you choose the "Autopick" option to let the server determine the type, then it selects the default "Vector Graphics (SVG)" type as would be expected. I'll be sure to include a "fix" for this! |
That is interesting behavior all around 😅 |
Hello @iOvergaard I acculty did as fix along this bug request #13211, for at fast issue fix, to Umbraco 11.2 ;) |
@rammi987 Yes you did. I think it is an acceptable solution until we merge the logic in MediaPicker with the Media Library. I tried on Friday to reopen your pull request, but unfortunately, our main branch has been renamed since then and the pull request is permanently closed. I have picked your proposed solution and some other stuff in a new PR #13780 and once it passes review, it should land in 11.2.0. |
@iOvergaard Make sense! But can you inlight me in what the future holds? In the PR request of my, you metion a internal task, witch I not was allow to see, about something due to the upload?. So is the src/Umbraco.Web.UI.Client/src/common/directives/components/upload/umbfiledropzone.directive.js gone for god or complete rewriten and when is the new Upload area set to be release eta? |
Yes sure, @rammi987. It's not quite that drastic. In short, we have two areas now where we are executing roughly the same logic: The Umbraco.MediaPicker3 property editor, and the media library. They both contain functionality for auto-selecting media types and deciding if the user should be shown the media type picker dialog. They also contain some logic to notify the user that an upload completed. We simply want to merge the two, i.e. making the media library using the newer logic from the media picker, which conversely would have fixed this bug as well. The dropzone directive will stay, and in fact, I would like for that to be the only way you enable drag&drop for media on any element. There is no release date, and as you said, we are tracking the feature internally at the moment. With the new backoffice slated for v13 later this year, the entire thing will be rewritten anyway, so at least from v13 on it will be different. Hope that was a useful answer 😇 |
Thanks for the report again. The bug fix has now been merged and is slated for Umbraco 11.2.0! |
@iOvergaard Thank you for the quick replies and fast action on these, it's much appreciated ❤️🔥 |
@iOvergaard Thansk for the cleary response on what the further will hold. I´ll meaby tag you in a futher bug report. Due to me and @sniffdk fund meaby found something else with the autoselect function. I´ll test both the dropdown as it is and the logic you showcase my! I´ll due the test on a 11.2 ;) So thx for now this I know was something witch was highly appreciated! |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
10.3.0-RC3
Bug summary
When you have multiple media ContentTypes and upload an file, through Media Section dropzone or through Media picker 3 Upload button. This image just gets upload right away, but at the same time a modal is shown to prompt witch type you´re trying to upload.
Either the modal is just trap forever and can never be closed, else you pick you media type, and it closes, but the file has already been upload and a type autopicked based on what Umbraco tells it that it should be "In our cases Image instead Video Image"
I have testede it and can see the bug has been present since 10.1.0 (maybe earlier).
Specifics
No response
Steps to reproduce
See video
screen-capture.webm
create a new media contentType (just a copy of image).
go to media section and upload an image.
The media is now upload before I picked a type. (Our new type) so the media is now an type of Images.
The same error is also present in the mediapicker dialog.
Expected result / actual result
I expected it to try to upload the media, but before that, the modal stops my and force me to pick an type.
The media is now uploaded in the picked type as you choose.
The text was updated successfully, but these errors were encountered: