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.

Archive /

Our old forums are still available as a read-only archive.

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

Change File Upload Directory for FileIFrameField


Go to End


2354 Views

Avatar
mcocolla

Community Member, 4 Posts

24 April 2008 at 5:18am

Edited: 24/04/2008 5:19am

I am trying to create a page template based on the StaffPage.php template from the tutorials.
I have defined a file upload field using FileIFrameField but I want the files that are uploaded in this field to go to a directory other than /assets/Uploads.

How can I modify this code to change the upload directory to /assets/vcard?

  $fields->addFieldToTab("Root.Content.Main", new FileIFrameField('Vcard'),'Content');

Thanks.