-
-
Notifications
You must be signed in to change notification settings - Fork 947
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
[ticket/16682] Fix plupload to work with rotated images in all browsers #6131
base: 3.3.x
Are you sure you want to change the base?
Conversation
Currently ACP attachment settings that engage plupload (image resizing) will not work correctly with browsers that implement auto-image rotate based on EXIF metadata. This happens regardless of whether or not the new ACP EXIF stripping option is selected. As long as phpBB ships with plupload it seems this should be fixed. (1) added a flag to plupload.full.js to do auto-rotation if the browser does not do it already, and does not auto-rotate if the browser already did it and (2) added code to plupload.html to set the flag. Both changes are small. (More details in ticket) PHPBB3-16682
It is not possible to edit the vendor's library JS file as phpBB did not write it, you should contact their creators and create a PR with them instead. https://github.com/moxiecode/plupload This is the primary reason why I suggested you use an extension in the tracker. Also, the settings you're talking about aren't involved in the whole thing, there is a logic in the code that follows a flow that can't be changed in this way, as far as I know. |
As I said in my first forum post here [https://www.phpbb.com/community/viewtopic.php?f=64&t=2429206&start=45], plupload has been commercialized and appears to be a dead public domain product - for several years. |
I know. But you can't edit the JS otherwise someone else would have already done it don't you think? |
Can't really tell what you changed in the minified file so we would have no idea what has changed. Your only option here is to override whatever function(s) it is you changed in the minified file in |
Here is the original, unminified, snippet:
and here is the modified version:
|
I might not have been clear. We aren't going to accept modification of a vendor's library so this pr cannot be merged as is. Your option for review and merge consideration will be to override the function through |
I appreciate your reply. I finally see your position on this approach. |
As I have tried to explain, just tried... (forgive me I am not English mother-tongue).. In physics, for every action there is an equal and opposite reaction. In this case this approach in any case is not what it should be. You want to do it server side (PHP) , that's it. |
This bug must be fixed one way or another ... plupload seems to be a dead project ... As far as I know it's not illegal to modify the code of a AGPLv3 licensed product. "Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software." Am I wrong ? |
Maybe what was said can be explained this way: In JavaScript you can override functions. Something like:
The person that sent in this PR knows what exactly they changed so it would have been easiest for them to isolate their changes and do such an override and we would be able to review the changes. This never happened unfortunately and now there are conflicts specifically with the plupload min file so I'm wondering if this is even needed at all. Could maybe take a look and make a proper PR later. However which of the two files fixed it for you? |
I changed (patched) both files from here phpBB/assets/plupload/plupload.full.min.js |
Currently ACP attachment settings that engage plupload (image resizing)
will not work correctly with browsers that implement auto-image rotate based
on EXIF metadata. This happens regardless of whether or not the new ACP EXIF
stripping option is selected. As long as phpBB ships with plupload it seems
this should be fixed.
(1) added a flag to plupload.full.js to do auto-rotation if the browser does
not do it already, and does not auto-rotate if the browser already did it and
(2) added code to plupload.html to set the flag. Both changes are small.
(More details in ticket)
PHPBB3-16682
Checklist:
Tracker ticket (set the ticket ID to your ticket ID):
https://tracker.phpbb.com/browse/PHPBB3-12345