Copied to clipboard

Flag this post as spam?

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


  • wtct 87 posts 130 karma points
    Oct 10, 2013 @ 16:22
    wtct
    0

    New directories structure for uploaded media

    A long time ago I had to change the directories structure of uploaded media in Umbraco because each file system don't like when we create a lot of files or directories in the one parent directory.

    I decided that the sufficient structure for me is like this:

    Root Media Directory
    |__Year
         |__Day Of The Year
             |__PropertyId
             |   |__Uploaded File
             |__Another PropertyId
                 |__Another Uploaded File

    So each day has own directory for files and it is easy to understand, list, seach etc.

    I modify the source code of uploadField every Umbraco upgrade. What is more I modified Multiple File Upload package (http://our.umbraco.org/projects/website-utilities/multiple-file-upload).

    Now I see that UI contains tool for multiple upload.

    Today I need some help because Umbraco core has changed a lot since 4.7.1.

    Could you help me and share some directions what I should change to achieve my target? When I make this modyfication I will create a pull request. This directory sructure will be available as alternate structure for media.

     

  • wtct 87 posts 130 karma points
    Oct 18, 2013 @ 09:10
    wtct
    0

    I was thinking about this problem in recent days. Probably the bast way is to create an event handler for saving uploaded files in media directory. The event would have to contains file path parameter which can be overiden in the event.

     

  • 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