7921 Posts in 1359 Topics by 933 members
|Go to End|
1 June 2011 at 4:43am
I have built some front end forms that allows users to upload pdfs and doc(x) files, using UncleCheese's tutorial: http://www.leftandmain.com/silverstripe-tutorials/2010/08/30/using-uploadify-in-frontend-forms/
There are two different types of forms that use uploadify;
1) a has_one relation - user can only upload one file
2) a has_many relation - user can upload 1 or more files
Basically these forms are for a company to help out charities and groups that need funding, etc. When these forms are submitted the person in charge is emailed, then they can log in to the back end where I have built a ModelAdmin to view all form submissions (i.e. requests), and download the attached files for reviewing/acceptance.
In the ModelAdmin on the has_one relation I was able to use a FileIFrameField and there is a link on the file to download the file.
However in the has_many relation, I'm using a FileDataObjectManager and while I can see which files are attached, there is no link or a way to download the file.
Is there a way to add a link to file or some other method I'm missing to make the files downloadable from the FileDOM view?
2 June 2011 at 1:43am
I'm not sure that a FileDOM is what you want to be managing that relationship. FileDOMs are for has_many relations to DataObjects that contain a has_one File relation. You're just managing a has_many directly to File, which is what AssetManager is used for.
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
|Go to Top|