The way in which files are saved in the Media folder is predefined by Umbraco, so unlees you write a different media store, it's not possible to change this. The reason it is like this is because the number is the related ID for the entry in the database, so the folder structure you see in the Media section of your Umbraco site is purely a pseudo folder structure (it only exists within the umbraco ui).
You could by all means create the folders your have mentioned manualy, and store files in them by hand, but these would not get picked up by Umbraco (Most people create a standard Images folder on the file system for site graphics which isn't managed by Umbraco, and just use Umbraco to manage "Content")
Is there a specific reason you need this folder structure? Or can you live with the default?
you could write an event handler to store the image and files in a different location based on your media section setup. Find out how by watching this umbraco.tv episode which deals with this.
You could do, but I would only recommend this if you have a real reason to do so (not dificuilt, but no point if it's not really needed). As I say, if you can live with the way Umbraco stores your files, it'll make life easier. You can still organise them within the Media section, it's just obviously not reflected in the underlying folder structure.
I can't say I have hit any problems with it the way it currently runs.
Clean links for Media / Images
Hii guys...
When ever I upload anything it goes and saves it under:
Media / 23423 / files
It creates these folders with numbers in it.
This is what I have done - Under media in umbraco, I have created the following folders:
- Images
- Videos
- Audios
- Flash
- Banners
I am uploading the right file under the right place but under MEDIA, it creates a numbered folder instead of saying Images, Videos, etc etc
Could you please help how I can fix this?
Thanks
Raheel
Sorry, for some reason this post got submitted twice.
I tried to delete it, it says deleted but didn't delete.
Thanks
Raheel
Hi Raheel,
The way in which files are saved in the Media folder is predefined by Umbraco, so unlees you write a different media store, it's not possible to change this. The reason it is like this is because the number is the related ID for the entry in the database, so the folder structure you see in the Media section of your Umbraco site is purely a pseudo folder structure (it only exists within the umbraco ui).
You could by all means create the folders your have mentioned manualy, and store files in them by hand, but these would not get picked up by Umbraco (Most people create a standard Images folder on the file system for site graphics which isn't managed by Umbraco, and just use Umbraco to manage "Content")
Is there a specific reason you need this folder structure? Or can you live with the default?
Many thanks
Matt
Hi Matt,
Most like I will have to live with this structure. Nothing that important, just used to having all images under one folder.
Dirk has also advised to use a event handler :
"
you could write an event handler to store the image and files in a different location based on your media section setup. Find out how by watching this umbraco.tv episode which deals with this.
Cheers,
/Dirk
"
Thanks
Raheel
Hey Raheel,
You could do, but I would only recommend this if you have a real reason to do so (not dificuilt, but no point if it's not really needed). As I say, if you can live with the way Umbraco stores your files, it'll make life easier. You can still organise them within the Media section, it's just obviously not reflected in the underlying folder structure.
I can't say I have hit any problems with it the way it currently runs.
Many thanks
Matt
is working on a reply...