Module: Plupload - used to replace swfupload
letic
Joined: 2011-12-23
Posts: 13 |
![]() |
|||
Hey guys, I developed a fix for bug http://sourceforge.net/apps/trac/gallery/ticket/1050 to replace swupload/uploadify by plupload. Plupload is a multi-runtime uploader supporting HTML5/Flash/Silverlight etc. It has a number of interesting features among which the ability to resize JPEG/PNG on the client before sending. This is a first version for code review. This was inspired by the default uploadify code and by the html_uploader module. So what does it do :
What needs to be done :
Please test it and report back to me. This is still a development version so be indulgent. I am a Java/C/C++ developer, Javascript/Jquery is new to me so there must be obvious mistakes. Code is available on github : https://github.com/letic/gallery3-contrib/tree/master/3.0/modules/plupload Cheers Edit : it seems that the tar.gz attachments is not working correctly added a zip instead.
|
||||
letic
Joined: 2011-12-23
Posts: 13 |
![]() |
|||
Here is an updated version with plupload 1.5.6 No change in the code yet I am waiting for feedback. Did anybody test this with other browser on other OSs ? |
||||
Kiko-
Joined: 2013-03-17
Posts: 3 |
![]() |
|||
Hi, The message was the same in both cases: Error: -200, Message: HTTP Error., File: image.jpg Gallery 3.0.3 running on Linux 3.2.38, PHP 5.2.17, MySQL 5.5.23-55 |
||||
letic
Joined: 2011-12-23
Posts: 13 |
![]() |
|||
Hey Kiko, Well I don't think the clients are to blame if you get the same behaviour in all browsers. It should at least work with Chrome and Firefox for sure. You should check in your gallery var/logs/ folder first to see if there are any errors there, but most likely you will find the actual errors in the Apache logs. Also have you checked the permissions on the module folders ? The error you see looks like an error in the upload script itself when its called for the form submit. Let me know if you see anything relevant in the logs. LeTic |
||||
Kiko-
Joined: 2013-03-17
Posts: 3 |
![]() |
|||
Hi Letic, thank you for your advice and sorry for my delay answering. I am not expert about Apache nor Php, but I am sure that permissions were right inside Gallery folders. So, I tried a different way: new installation from zero in the same shared server (same Apache, Php, MySQL... versions), but in this case I installed a new Gallery 3.0.6 (the previous one was 3.0.3), and surprisingly Plupload could upload files from any browser or smartphone without error messages. Great! One could conclude that something at Gallery core was updated from 3.0.3 to 3.0.6... don't know what, but who minds. Well, that problem solved. One gallery user has reported a mistake to me today. The size of many images (full size) were wrong, and it was detected when printing a picture (pixelated). I was the one who uploaded the file, so I am holding the original... I deleted the file at Gallery and re-uploaded it again using plupload, and got the same wrong size result at var/albums. Question: have you ever had this problem in the past? Possible incompatibility between Plupload and other modules? Thank you. |
||||
letic
Joined: 2011-12-23
Posts: 13 |
![]() |
|||
Hey Kiko-, Kiko- wrote:
I was the one who uploaded the file, so I am holding the original... I deleted the file at Gallery and re-uploaded it again using plupload, and got the same wrong size result at var/albums. Nope it's not an issue it's the current expected behaviour ! The plupload module is not final yet it was just a testing version. The interest of using plupload (for me at least) was to resize the image on the client side before sending it to the server to save you the bandwidth. As I said in my original post : letic wrote:
The default value of the "resize_size" parameter is 640x480 in most themes. So this is what is happening. As I said the module was uploaded for code review and is not yet intended to be used on production server. If you want to use the plupload module without the resize comment line 74 in : plupload/views/form_plupload.html.php : //resize : {width : <?= $resize_size ?>, height : <?= $resize_size ?>, quality : 90}, This will disable the resize on the client side. I am currently working on the gallery3 debian packaging and have left this module aside for the moment. But if you are interested in a better version I will try to have a look at it soon. Thanks a lot anyway for testing ! |
||||
Kiko-
Joined: 2013-03-17
Posts: 3 |
![]() |
|||
OK, I understand it nooooow (my mistake testing without reading first!!). I need Plupload because it seems to be the only confortable way to upload files from iOS systems (we can also use 'html uploader' module, but uploading dozens of files at the same time is not possible). And I do need to keep original full size of all the files, so I will comment the line 74 as you are recommending... THANK YOU. I understand you are busy. No pressure... just to add, in the name of all iOS users (iPhone, iPad) of Gallery 3 web sites in the World ;) that we shall wait patiently a new admin parameter in this module to easily block such size reduction, from you or any other php expert enough. It was a great work indeed, thank you again! |
||||
evadim
Joined: 2013-05-03
Posts: 5 |
![]() |
|||
Hello! I found this module then my regular flash uploader start crashing. Any way flash uploader drop some files time to time - usually if I upload 5+ files at once. Plupload looks more stable - it didn't crash! (yet?) and also show prview in system-wide "open file" widget. But, it don't work on Opera linux 12.15 - then I click button to open files, after 5 sec it reload page. In Chrome linux 26 woks fine. I'll test at Monday from work from win7 IE10/FF/Opera/Chrome. Few suggestions/feature requests: Anyway - thank you very much for this module, now I can upload photos without manually re-check warnings about failed uploads. |
||||
letic
Joined: 2011-12-23
Posts: 13 |
![]() |
|||
Hey evadim, Thanks for the feedback ! Glad it can be useful ! Just concerning your suggestions : Quote:
create config option to disable resize-on-the-fly yup this is planned, I actually started having a look at this code once more. Quote:
create config option to disable debug message well as I said before this is still a WIP very early first working version. The debug output will obviously be disabled from more polished version. |
||||
evadim
Joined: 2013-05-03
Posts: 5 |
![]() |
|||
So, I'll wait for new versions to test I think a bit about this 2 things, while upload few pics. Maybe better, combine config option with checkbox in upload dialog. Anyway, thanks for "very early first working version" of module - it work better for me, than stock one |
||||