Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Raheel 62 posts 81 karma points
    Oct 07, 2010 @ 04:32
    Raheel
    0

    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

  • Raheel 62 posts 81 karma points
    Oct 07, 2010 @ 04:33
    Raheel
    0

    Sorry, for some reason this post got submitted twice.
    I tried to delete it, it says deleted but didn't delete.

    Thanks
    Raheel

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 07, 2010 @ 09:45
    Matt Brailsford
    0

    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

  • Raheel 62 posts 81 karma points
    Oct 08, 2010 @ 00:26
    Raheel
    0

    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 :

    "

    Dirk De Grave posted this reply 14 hours ago
    • Mark this reply as the solution

    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

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 08, 2010 @ 09:16
    Matt Brailsford
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft