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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Uploadify: how to upload to an external server


Go to End


1355 Views

Avatar
skorp

Community Member, 6 Posts

20 January 2012 at 11:42pm

Hello,
I'm serching a way to upload a File (from Frontend and Backend) to another Server.
i tried this

$resume= new FileUploadField('Form_addForm_File', ' hochladen', array (
				'buttonText' => 'hochladen',
				'script' => '/gogo.php',
				'upload_on_submit' => true,
				'auto' => false
				))

the first problem is, my php file (gogo.php) which uploads the file with curl to another Server should return the response.. Response contains the saved documentID i want to save it in a hidden field, and then after Form is validated save it to my table.

The second problem is i want to run gogo.php after the form validation is done. now its running before the form is validated.
how can i do it best? anyone an idea?