-
-
Notifications
You must be signed in to change notification settings - Fork 103
Upload usability fixes #1507
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
Upload usability fixes #1507
Conversation
…true' which directly adds uploads after success to the selected items field and closes the contentbrowser
50ccb03 to
5c5dcf8
Compare
|
I tested the inmediately-add-and-select feature and works as expected. I tested also the upload fails, and the error is shown in the dialog, so I would say that is expected too. |
|
The only thing I found is that the Image browser lets you uploading an arbitrary PDF file which then is inserted in TinyMCE which it shouldn't be possible. |
Yeah, saw that too. |
|
@erral mimetype restriction argument is implemented and image modal now only allows "image/*" mimetype. The only thing I encountered is when dropping a disallowed mimetype to the dropzone ... this should be more obvious that the dropped file is not allowed... selecting with "browse" is OK, because the file brower is restricted to the mimetype. |
Yes I have seen that too :) But I think it is working. |
…. pat-tinymce uses this to ensure only 'image/*' mimetypes in image modal.
e868cef to
f9d017a
Compare
|
@petschki do you want me to further test this? I see some changes after my previous tests... |
|
Currently I'm waiting for @frapell feedback but I think you have tested the |
Mmmm, I tried passing a custom mimetype in that option (adding Perhaps I am missing something, I will keep testing it. |
|
This has to be a string (like Basically like here https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#accept |
Ah, of course :) It works as expected, but the behavior is a bit strange if I use the options like "doc" explained in the MDN docs, but setting full mimetypes works as expected. Like previously, I can cheat my browser and select a non-accepted mimetype file, and it tries to upload but it finally doesnt' and doesn't report the error. I could live with that, but if possible it would be nice to report an error there. |
|
@petschki As far as I can test, this seems to be working perfectly, and I see the error printed if the I would focus in errors reported by normal usage by editors, and while it would be nice to show error messages in cases like the ones mentioned by @erral I think it is fine if someone manages to "cheat the browser" to not actually get a helpful error (In fact if they are messing with the devtools, they might know already what the error is about ;) ) |
frapell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
|
I am merging the locales PR too. |
|
This (and others) is now released in |
Closes #1491
Successor of #1492
This PR implements:
upload-add-immediatelywhich defaults totrue. This fixes usability issues in the TinyMCE link/image modal.