Feature/5142 implement resize on upload for browser and easyimage #5144
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.
Closes #5142
Fixes #5143
This PR addresses 2 issues, because I ran into the second while fixing the first. #5143 looked critical, although I didn't get that one before.
Summary
The fix for #5143 is done by improving the ccode: before we would save the uploaded file, and when needed we'd resize it and save it again. Since the second save gave a "file in use" exception, I changed the code around so we're now first checking to see wether or not the file needs resizing. In any case we're only saving it once.
The fix for #5142 is done by implementing the logic for resizing on upload in FileUploader.ashx. In order to get that done, I needed the current editor settings there, and for that, I needed to add extra querystring parameters to the url for FileUploader.ashx.
I based this PR on the release/9.11.0 branch, hoping that's ok.