Custom section with file upload - Add files to media library
Hi,
I have created a custom section in umbraco that uses a standard asp.net fileupload control to upload document files. These document files are uploaded to a folder I have created at the root level of my umbraco website. Does anyone know how I can add these files to the default media section of umbraco so that these files can be available via the media picker data type.
How about creating a media item programmatically once you've handled the upload and set the source of the file to the path you've used to store the file (not entirely sure if that would work tho)?
Custom section with file upload - Add files to media library
Hi,
I have created a custom section in umbraco that uses a standard asp.net fileupload control to upload document files. These document files are uploaded to a folder I have created at the root level of my umbraco website. Does anyone know how I can add these files to the default media section of umbraco so that these files can be available via the media picker data type.
Thanks,
Marc
I don't think that's possible (the media section is build like it is and is expecting a folder/file structure like you can see in the 'media' folder).
You could take a look in the source code of Umbraco to see if it's possible.
How about creating a media item programmatically once you've handled the upload and set the source of the file to the path you've used to store the file (not entirely sure if that would work tho)?
Cheers,
/Dirk
is working on a reply...