Copied to clipboard

Flag this post as spam?

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


  • Marshall Bell 19 posts 59 karma points
    Aug 12, 2009 @ 20:38
    Marshall Bell
    0

    HowTo Flatten Contents in Media Folder?

    Hello!

    By default, media files are stored under media\<id>\<filename> and I read that there are settings to change it to use media\<id> + <filename>.

    My question is where is the setting to change this?

    Also, is there any option of storing the files in the database?

    Thanks,
    Marshall

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 12, 2009 @ 20:58
    Thomas Höhler
    2

    It is in the umbracoSettings.config in the config folder:

    <!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext 
    should be set to false if the aspnet account hasn't got readrights of the driveroot up to the /media directory -->
    <UploadAllowDirectories>False</UploadAllowDirectories>

    Thomas

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 12, 2009 @ 21:00
    Thomas Höhler
    101

    Don't forget to restart the application to reflect the changes (i.e. by touching the web.config)

    btw: By default there is no option to store the medias in a database, but you can create your own datatype which can do this.

    Thomas

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 12, 2009 @ 21:12
    Dirk De Grave
    0

    Marshall,

     

    Storing files in a db is an option but requires some coding. I've got an ongoing project running at http://pm4umbraco.codeplex.com which handles securing media files (if that is what you're after with storing files in db, i don't see other reasons atm). Although not currently implemented, but will be for future release (which will be provider model based so any 'secure' implementation can be used).

     

    Cheers,

    /Dirk

  • Danny Douglass 28 posts 43 karma points
    Aug 14, 2009 @ 17:04
    Danny Douglass
    0

    Hi Dirk,

    I have a similar challenge in that I would like to change the location where the media is stored to a shared SAN location to allow other frameworks to manage their media in Umbraco, but still easily reference it locally (on other servers).  Are there configuration options for this change?

    Thanks!
    --
    Danny

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 14, 2009 @ 17:59
    Dirk De Grave
    0

    @Danny: seems feasible, altho not included in current project status. Basically, you need to override the upload field functionality to store your media items where you'd like them to store and override the method that builds the hyperlink. Might look into how it can be done (it would simplify things as there's no permission check required before downloading files) and see if it can make it in a future release.

     

    Cheers,

    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft