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

SWFUpload with MultiForm


Reply

5 Posts   948 Views

Avatar
joern

24 March 2010 at 1:51am (Last edited: 24 March 2010 1:53am), Community Member, 28 Posts

Hello,
I create new records from the frontend and in the first step i would like to upload the images.
I would like to create the record and his relationship only at the end of the process to avoid unnecessary data in the database.

The upload works, and I get the ID of the file.
But how do I save it in my multiFform-Session? Do I use a separate handleswfupload function?

Can i change the SWFUploadControls->$image_class?

I hope you can help me.
Thanks Jörn

Avatar
UncleCheese

24 March 2010 at 2:34am 4085 Posts

Yeah, in your _config.php, just add:

SWFUploadControls::$image_class = "MyImage";

Avatar
joern

24 March 2010 at 3:10am Community Member, 28 Posts

hi,
Thanks for your reply.
The class in the files-table is now correct, but how do I get in the form of multi-session?
I still have to use my own swfhandler-function and link it in there?

Avatar
UncleCheese

24 March 2010 at 3:46am 4085 Posts

Shouldn't have to update the handleswfupload().. you have the ID, so there must be a way to store the value in your MultiForm module.. I've never used that module, but I assume it works on sessions. You could do it crudely by using Session::set(), I suppose.

Avatar
joern

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

Yes, I'll have to save it in the session, but the ID is handed back again to the Flash.
I must save it before, right?

At the end of the form-step, I will save it from the session in the multi-form.