Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Multiple Instances of SWFUpload in the Same Form


Reply


5 Posts   2561 Views

Avatar
xeraa

Google Summer of Code Hacker, 58 Posts

24 March 2010 at 4:38am

I hope I haven't overlooked anything obvious, but is there a way to use multiple instances (new SWFUploadField(...) of SWFUpload in the same form? One field is for videos and one for images - just combining it into a single upload field is not desired.

Putting two instances into the same form made one "eat" the other: Only the first one was displayed but used the settings of the second one...

Avatar
UncleCheese

Forum Moderator, 4096 Posts

24 March 2010 at 4:53am

Yeah, it doesn't work that way. :(

There's so much javascript to manage in that class, I couldn't imagine having it support multiple instances at the time I built it. Now that I know a little better, I think it's a good item to have on the wishlist, though.

Avatar
xeraa

Google Summer of Code Hacker, 58 Posts

24 March 2010 at 5:00am

Thanks for the quick reply.
I've seen it for example at http://blogs.bigfish.tv/adam/examples/swfupload-jquery-plugin/examples/02%20-%20multiple%20uploaders.html (without taking a look at the underlying code) and was wondering if it was possible.

Well, at least it wasn't me ;-)

Avatar
UncleCheese

Forum Moderator, 4096 Posts

24 March 2010 at 5:14am

Oh, I'm sure it's possible. I have no doubts about that. But anytime you have multiple layers like this, they have to move in sync. The PHP and the javascript are managed by the same codebase, so there's a tradeoff for the simplicity you get out of SWFUploadField..

Avatar
joern

Community Member, 28 Posts

24 March 2010 at 11:12pm

Hi,
are you using the jQuery version? Does it work with one instance?