I would like to develop a site that allows audio file types to be uploaded with relevant notes, etc. Is there a working example or some notes on how this might be achieved? I am reluctant to allow uploads using HTTP as we might get timeout issues and I am wondering if the file can be uploaded and I can perform a lookup of a specified folder to link to this file via the backend interface for SilverStripe.
You can upload files to the assets folder via ftp or scp. After visiting the "Files & Images" tab in the CMS, all the references to the files will automatically be stored in the database. You could then use these references to output a list on a page.
Sorry, I don't know of any working examples myself. Hope this helps.
7 May 2007 at 5:33pm
(Last edited: 7 May 2007 5:35pm),
Ok...I've since learned that the "Content" field is used for the description of the file.
From the IRC you told us that you're working on a site to contain pages of type 'seminar'. You need to be able to select a sound file to link to in the seminar page for users to download/listen to.
Within the Seminar.php file you can add a field to the $has_one array for storing the specific file you want to attach. Within the getCMSFields function, as per tutorial 2, you can add a 'TypeDropdown' field to the main tab.
You would then reference the field added to the $has_one in the Seminar.ss file to create a link to the file.
This is quite a rough description of what you can do. Please ask if you need a hand with the details.