New Module: Uploadify
suprsidr
Joined: 2005-04-17
Posts: 8339 |
Posted: Thu, 2010-02-25 03:31 |
A new module Uploadify adds a jQuery powered multiple file uploader - from http://www.uploadify.com/ Currently only available on flashyourweb.com - will add it to the Community Repository after hearing from a few folks ;) Enjoy! -s |
|
Posts: 16
This works perfect as is! Having this module instead of the Java Applet is great. Can upload large media files now with no problem. Don't have to deal with Java Applet limitation. The file upload feedback is cool too. Thanks for putting the work in suprsidr. I'll be testing it more throughout the week and will report back with any issues or ideas on improving.
Posts: 81
Installed this as instructed - plug in appeared in plug in section where I activated it but there is no link in the left column to use it. Help please
Sue
Posts: 8339
So when you click "Add Items" from an album you don't get the tabs: "From Web Browser", "From Local Server", "Upload Applet", and "Uploadify"?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 81
Wel DUH! Now I get it - was looking in the wrong place - install was too simple I guess
thanks
Sue
Posts: 1
Hi. Very cool uploader. Unfortunately Im having a problem with it. It installs and starts fine. I can choose files and it uploads. As soon as it completes the upload I get an HTTP Error Undefined? And of cause nothing is uploaded? Help!
Posts: 8339
http://codex.gallery2.org/Gallery2:FAQ#What_information_is_required_when_I_ask_for_help_in_the_forums.3F
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16504
Hey suprsidr! I meant to respond. I finally used this module. It's working great for me!
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8339
Thanks @nivekiam, I've happily removed all other upload options in my gallery(s) besides serverAdd I think Uploadify rocks.
Especially w/ large uploads.
My only problem w/ adding it to community repo is the translations requirement.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16504
what's the requirement? Do you need to do something to make it able to be translatable? There are lots of community modules that have English as the only option.
I was able to upload 10 2+MB images with it. Something I could only do with the "From Local Server" method because of upload size limits on my host. It's going to become my preferred method of uploading.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 6
Hi, I'm having strange issue with this uploadify, I'm currently using it with Gallery 2.3.1
my gallery site: http://photos.ronvoto.com
phpinfo site: http://photos.ronvoto.com/test.php
The problem: Uploading doesn't work in some computers (not all); The upload returned "HTTP: Undefined"
After editing the javascript, I manage to get the object status, it returned 500 (which is the server Error number).
The main problem is that the problem is not happening on all machine. I have no problem uploading images in my machine using Firefox 3 and Safari 4 (on OSX 10.6), but my friend which was running similar machine to mine, always have the error when uploading files (both on his firefox and safari, it was successful once after clearing cookies in firefox but then never again..).
Then I tried my windows machine, and I got the error when uploading using the firefox, but success on chrome. I tried in another PC, and had successful upload with firefox.
all machines have the same shockwave plugin version.
All the errors seem to be the same, the gallery error log has this on the failed upload
Date -removed-
Type Gallery Error
Location http://photos.ronvoto.com/main.php?g2_controller=uploadify.Uploadify&g2_itemId=17&g2_addPlugin=ItemAddUploadify&g2_authToken=f090b1f57cb3&g2_GALLERYSID=3b75c3b4c1b41857333ff63bb133a03c
User Id 5
Client -ip removed-
Summary ERROR_REQUEST_FORGED
Referer
Details
Error (ERROR_REQUEST_FORGED)in modules/core/classes/GalleryController.class at line 239 (GalleryCoreApi::error)
in main.php at line 245 (GalleryController::assertIsGenuineRequest)
in main.php at line 106
in main.php at line 90
Request variables: Array
(
[controller] => uploadify.Uploadify
[itemId] => 17
[addPlugin] => ItemAddUploadify
[authToken] => f090b1f57cb3
[GALLERYSID] => 3b75c3b4c1b41857333ff63bb133a03c
)
Based on the log, I tried clearing the cookies and user sessions; but nothing worked (except once on firefox).
I changed the GalleryController.assertIsGenuineRequest to always return null (to skip the checking); the uploadify then able to complete the upload, but the photo can't be found in the album on the machines that originally failed to upload (no problem on the previously successful upload machines/clients)
Posts: 16504
Suprsidr may have some other suggestions, but make sure everyone is using the latest version of Flash. Double check it, triple check if you have to.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 6
I'm using the latest version of Flash. also just tested Gallery 3, the upload works fine in Gallery 3 (both seems to use uploadify).
Posts: 8339
Hey look what happens while I sleep ;)
Usually REQUEST_FORGED means no authToken, but we have that. We also have userId 5 which is guest.
I'll assume you're not trying to upload as guest - so I'm thinking gallery is not gleaming the correct user from the session.
Let's try adding $user = $gallery->getActiveUser();
to Uploadify.inc ~line 72 just before GalleryCoreApi::assertHasItemPermission
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 6
Nope, that line didn't change anything
added $user = $gallery->getActiveUser();
still returned HTTP: Undefined Error.
also I changed the assertIsGenuineRequest to always return NULL, no error but item is not in the album; still the same as before
Posts: 8339
This is very difficult to troubleshoot as it works for me in all browsers on: win7x64, win7x32, winXPx32 and Mac OSX10.6
So I'm adding some debug:
Uploadify.inc function handleRequest line ~66 immediately after global $gallery;
and set debug to logged in gallery2/config.php - you must provide a full system path to a writable txt file ie.
$gallery->setDebug('logged');
$gallery->setDebugLogFile('/path/to/writeable/error.log');
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 8339
yea, guest still does not have permission to add items - I'd hope.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 6
I added those debugging lines in uploadify.inc, but nothing showed in the debug file. It seems like the uploadify handleRequest is not called yet.
So I copied those lines in main.php at line 246 (right after the assertIsGenuine check).
The debugging results (both on failed and successful upload):
Failed Upload:
2010-04-12 19:57:28 [TMP_SESSION_ID_DI_NOISSES_PMT] ret is not null
2010-04-12 19:57:28 [TMP_SESSION_ID_DI_NOISSES_PMT] Uploadify User Agent: Shockwave Flash
2010-04-12 19:57:28 [TMP_SESSION_ID_DI_NOISSES_PMT] Uploadify User:
Successful Upload:
2010-04-12 19:56:09 [d46b109570230aab4c7c58dde01a0f1a] ret is null
2010-04-12 19:56:09 [d46b109570230aab4c7c58dde01a0f1a] Uploadify User Agent: Shockwave Flash
2010-04-12 19:56:09 [d46b109570230aab4c7c58dde01a0f1a] Uploadify User:
2010-04-12 19:56:09 [d46b109570230aab4c7c58dde01a0f1a] ret is null
2010-04-12 19:56:09 [d46b109570230aab4c7c58dde01a0f1a] Uploadify User Agent: Shockwave Flash
2010-04-12 19:56:09 [d46b109570230aab4c7c58dde01a0f1a] Uploadify User:
*I modified the debugging lines to print the ret value, and still print the lines even if the ret is null, the successful upload are showing doubles because they are the lines from main.php and uploadify.inc
Seems like the failed upload has no session ID which explain the ERROR_REQUEST_FORGED.
Another thing I can add: the failure seems dependant to the connection, I have no problem with my home connection using 4 different machines, all can upload fine. In my friend connection, she can't upload at all (both using safari and firefox). In my office connection, I can upload in Chrome, but not in firefox (because firefox is using different proxy, but when I change to use the same as chrome, I can upload fine with firefox). All machines can upload fine with web browser and upload applet.
edit:
another thing to add that maybe helpful to you.
In the log file, the last part that the session ID still showing on the failed Upload is in these lines :
...
2010-04-12 19:57:28 [2afbcdad2084a5709ec6799eba00df02] Session hijack detected: saved vs. current below
2010-04-12 19:57:28 [2afbcdad2084a5709ec6799eba00df02] Array
(
[0] => *IP removed*
[1] => ed85134591de88bd03316323c843a8d3
)
2010-04-12 19:57:28 [2afbcdad2084a5709ec6799eba00df02] Array
(
[0] => *IP removed*
[1] => 9df1a6eee936ab4c41a42dd7e4203de4
)
2010-04-12 19:57:28 [TMP_SESSION_ID_DI_NOISSES_PMT] getParameter language.useBrowserPref for core plugin
2010-04-12 19:57:28 [TMP_SESSION_ID_DI_NOISSES_PMT] getParameter default.language for core plugin
2010-04-12 19:57:28 [TMP_SESSION_ID_DI_NOISSES_PMT] controller uploadify.Uploadify, view
...
Posts: 6
any progress regarding the HTTP undefined error issue?
Posts: 16504
Do you happen to be using HTTPS (ssl)? If so, do you happen to be using a self-signed cert?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8339
Its your proxy causing the issue, I'm trying to figure out how to deal w/ it.
I've put in a request to another gallery coder... waiting for his reply.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 6
nope, normal http.
Posts: 58
Thanks to nivekiam for pointing me to this plugin. I can upload again from the web browser! Thank you!
I'd like to roll this out to a site I run for family and friends. Is there any way I could configure the plugin for my site so it doesn't automatically drop the filename in the Title/Summary/Description?
Thanks!
Posts: 8339
Sorry no configuration options yet
gallery2/modules/uploadify/Uploadify.inc line ~168 sets the filename for those:
$title = $summary = $description = isset($file['name']) ? basename($file['name']) : NULL;
I need to add the same "Set item titles from" section to the form.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 8339
@nivekiam in the template ItemAddUploadify.tpl you can set the number of simultaneous uploads... I have it set to 2:
'simUploadLimit' : 2,
While testing I found that uploadify only ever used 2.
If I set the limit to 5 the first and fifth files would upload simultaneously never all 5.
So I'm wondering if you could try playing w/ that number and reporting your results.
It may be my connection to my server, or just my server limiting my results.
I'd like to set the number higher or offer admin options, but not if the result would be the same.
Thanks
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16504
Yeah, I'm seeing similar results on both my shared host and my VPS. I don't know what else to set or check in PHP or Apache, but it appears I can only get 2 simultaneous uploads at a time. It doesn't appear to be a browser limitation as far as I can tell.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8339
Just put up the latest http://www.flashyourweb.com/filemgmt/index.php?id=40
Added form options for "Set item titles from" and plugin options too.
Testers welcome.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 16
Nice! Downloading now!
Posts: 58
Very cool. So far it's testing well. Thank you.
Quick update: looks like file names are still showing up in the title, even if I don't have it checked. Other than that, seems to work fine.
Posts: 8339
Which browser/OS?
I spent all day figuring out that bit of trickery.
jQuery thinks a checkbox is "on" no matter which state the checked is in. - Never imagined jQuery was wrong - Chased that around all day.
FYI - Dan(neven) is making better looking buttons so that update should come soon.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 58
Windows XP SP2, Firefox 3.6.3
Thanks!
Posts: 8339
Ok, fixed that... and implemented Dan's new buttons - Thanks Dan
get the latest - no version bump.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 58
Looks like it's working. Thank you!
Posts: 1642
Awesome work on this mate. Looks like I will dump the "web browser" option for this.
--
dakanji.com
Posts: 16504
It's my only upload method for right now.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4
Hi,
I was hoping to be one of the lucky ones; sadly not.
I get a 'HTTP: upload failed' on every attempt.
Sean
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.5 cgi
Webserver = Apache 5.1.33334
Database = mysqli 5.0.89-community, lock.system=flock
Toolkits = Gd
Acceleration = none, none
Operating system = Linux portland.eukhost.com 2.6.31.6-grsec-grsec #1 SMP Wed Nov 25 23:04:58 GMT 2009 i686
Default theme = matrix
gettext = enabled
Locale = en_GB
Browser = Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Rows in GalleryAccessMap table = 12
Rows in GalleryAccessSubscriberMap table = 29
Rows in GalleryUser table = 3
Rows in GalleryItem table = 29
Rows in GalleryAlbumItem table = 4
Rows in GalleryCacheMap table = 0
Posts: 8339
Gallery checks permissions, maybe your session needs to be refreshed.
Logout of gallery and clear your browsers cookies for that site - try again.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 4
No, that didn't do it - any other ideas?
Thanks for the help,
Sean
Posts: 8339
I'd only be guessing further without more information.
try putting gallery into logged debug mode in gallery2/config.php
you'll have to supply gallery with the path to a writable text file for logging.
something like:
$gallery->setDebugLogFile('/full/system/path/to/g2data/tmp/my_debug.log');
$gallery->setDebug('logged');
you can also check your server's php/http log files
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 71
any chance of making this module showing thumbnails ? like the flash uploader from gallery3 ?
Posts: 71
how to make the "Uploady" being the first tab (or the active tab) when i click the "Add Item" link ??
in this moment "From Web Browser" seems to be the first (active) tab and the majority of users seems to be use this one.
i had a look at modules/core/templates/ItemAdd.tpl but i don't see nothing there how could i change the order of the upload methods tabs.
Posts: 1153
trying to test this, but the Browse button doesn't work at all.
using PHP 5.2.13 and mySQL 5.0.x on a G2.3.1 multisite - all I see is a stalled request to the codebase, nothing happens. no errors on my Apache logs.
I have Firefox 3.6.6 and Flash 10.1 installed on OSX 10.4
the Gallery 3 flash uploader works fine though.
please advise, thank you!
___________________________________________________
http://pixi.me/
Posts: 8339
multisite?
could be flash's ridiculously strict cross-domain policy.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 1153
thanks for the link! I dumped the crossdomain.xml file on botn parent directories as instructed.
I don't see any attempts to fetch crossdomain.xml on my Apache logs files for both the subdomain where the G2 site is running, and the subdomain the G2 codebase is running.
still, the Browse button doesn't invoke a popup dialog box.
please advise, thanks!
Posts: 8339
Does the browse button load?
should look like this:
[img]http://www.flashyourweb.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=42273[/img]
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 1153
YOOOOOOOOOOOOOOOOSHHHHHHHHHH!!!!
edited jquery.uploadify.v2.1.0.min.js and changed "scriptAccess:"always"
now the dialog box pops out, but Upload doesn't work. and Cancel or Clear buttons don't do anything.
it looks like the flash portion isn't loaded at all. Normally, i could access a popup dialog box with a link to "Adobe Flash", but all I see is View Source which means, something is wrong, the flash script isn't being loaded correctly in my setup.
please advice, thank you!
___________________________________________________
http://pixi.me/
Posts: 8339
Do you have firebug? any javascript errors?
or are you including jQuery more then once on your pages?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 1153
i have Firebug installed, but I don't know where to look for errors and such, any pointers will be much appreciated, thanks!
basically, I have a G2.3.1 codebase, stock theme (non modified) and installed the Uploadify plugin through Site Admin
i go into Add Items > Uploadify (tab)
i modified jquery.uploadify.v2.1.0.min.js to make the Browse button work, but the items are not being uploaded when i hit Upload, nor is there a progress bar. I can't also remove the queued items from the listing by clicking on the X buttons, the same with Clear, it doesn't do anything. I would have to refresh the page F5 to clear it all out.
Posts: 1153
this is what i could find:
Posts: 8339
that's a YAHOO error.
Uploadify does not use YAHOO.
Deactivate uploadify and see if the YAHOO error persist in your gallery.
Unfortunately js errors halt any further js from being executed.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 1153
just confirmed the plugin works only on a standalone Gallery 2 setup, and if you have mod_security, you must have "SecFilterEngine Off" in ~/gallery2/.htaccess - else, you will get an an error.
the Gallery 3 Uploadify implementation doesn't require the "SecFilterEngine Off" modification at all, uploading works out of the box.
please advise, thanks!
___________________________________________________
http://pixi.me/