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


5 Posts   2476 Views


24 March 2010 at 4:38am Google Summer of Code Hacker, 58 Posts

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...


24 March 2010 at 4:53am 4085 Posts

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.


24 March 2010 at 5:00am Google Summer of Code Hacker, 58 Posts

Thanks for the quick reply.
I've seen it for example at (without taking a look at the underlying code) and was wondering if it was possible.

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


24 March 2010 at 5:14am 4085 Posts

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..


24 March 2010 at 11:12pm Community Member, 28 Posts

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