-
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
Fix: Allow dragged images in the rich text editor to be uploaded correctly #13016
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…w built-in Path.IsPathFullyQualified
bergmania
approved these changes
Sep 19, 2022
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 💪
iOvergaard
changed the title
V10: Fix to allow dragged images in the rich text editor to be correctly uploaded
Fix: Allow dragged images in the rich text editor to be uploaded correctly
Sep 19, 2022
nul800sebastiaan
pushed a commit
that referenced
this pull request
Sep 19, 2022
…tly uploaded (#13016) * update string extensions IsFullPath to support more filepaths with new built-in Path.IsPathFullyQualified * resolve TODO to switch to Path.IsPathFullyQualified supported from .NET Standard 2.1 * Use content root instead of web root for uploaded images * Un-break a breaking change * handle special parsing of AngularJS json response * change htmlId selector to support html id's with numbers * remove bad test case * test IsFullPath without tricky UNC paths that are not useful Co-authored-by: Bjarke Berg <mail@bergmania.dk> (cherry picked from commit d18dc92)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
While upgrading TinyMCE for v11, we discovered that drag&drop of images did not work as intended in TinyMCE, where the images would be pasted as base64 inline data, and after fixing that, they did not land in the correct tmp folder on the server (needed to use ContentRoot instead of WebRoot in TinymceController). Also, absolute paths on MacOS at least was erroneously being handled as relative paths which further resulted in the server not being able to find the tmp images. The last key to the fix was to parse the returned JSON response from the
UploadImage
endpoint since it uses the special AngularJS prefix so we needed to split by newlines and take the second line of the response since we are working with a raw XHR object.