Copied to clipboard

Flag this post as spam?

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


  • JL 5 posts 25 karma points
    Jul 08, 2010 @ 22:16
    JL
    0

    How to save media to directory other than /media

    Hi, I've spent that past several hours trying to dig up some information on how I can save media uploads to a different directory location on disk.

    From what I was able to gather, I've used the BeforeSave event handlers to set the "umbracoFile" property value to my new location. However, this does not create a copy at the specified location.

    What am I missing here?

    Please help!

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Jul 08, 2010 @ 23:01
    Stefan Kip
    0

    If you cange the "umbracoFile" property's value, you'll have to copy the image there yourself...

  • Tim 1193 posts 2655 karma points c-trib
    Jul 09, 2010 @ 12:25
    Tim
    1

    There's an example of using events to rename the image folders that you should be able to adapt. You can see it here on Umbraco TV: http://umbraco.org/documentation/videos/for-developers/events/friendly-media-item-paths (you need a subscription to view it).

  • Tim 1193 posts 2655 karma points c-trib
    Jul 09, 2010 @ 12:28
    Tim
    0

    I forgot to mention, the example has downloadable source code that you can look at as well. You need to use the after save event rather than the before save.

  • JL 5 posts 25 karma points
    Jul 09, 2010 @ 20:17
    JL
    0

    Thank you for your help.

    I was able to figure it with your help.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies