Copied to clipboard

Flag this post as spam?

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


  • Samin Shrestha 1 post 21 karma points
    Dec 31, 2014 @ 21:07
    Samin Shrestha
    0

    Why does Umbraco v.6 creates a new media folder everytime in the server side when uploading a new image file

    Hello everyone,

    I am trying to remove the existing image file from the media admin tool by using remove file checkbox. It does remove the file physically from the server. However, when I try to upload a new image file in the same media content it actually creates a new folder and saves it on there. So, every time when you remove the existing file and upload with a new file, it creates a new folder. I also compared with the Umbraco v.4 and it seems that in v.4, it does not create new folder. It simple uploads the file in the same folder location from where the old file was removed.

    I was wondering if anyone knows, why Umbraco v.6 create a new folder every time when you remove files and then you try to upload it 

    Thank you.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 01, 2015 @ 01:27
    Jan Skovgaard
    0

    Hi Samin, Happy new year and welcome to our :)

    That's just the way it is working - The folder name is the corresponding id to the id of the media node.

    It should work like this

    1: You create a media item (node) and give it a name - This node has an id 2: You then upload a file or image (depending on what node type you created - File/Image) - The file is then attached to the node 3: Then the folder is created on the server 4: If you remove the file from the node and then upload a new file then it should be placed in the same folder since the id has not changed because the node/item was not deleted

    If you delete the node/item and then create a new node/item and attach the same media to it a new id will be created and a folder with a name corresponding to the item/media will be created as well for storing the file.

    Does that make any sense? If what I have written above is not acting as described on v6 could you then please show a screendump of your media section in the backoffice and of the folder structure on your disk? Just so I can understand the issue better...:)

    /Jan

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Jan 01, 2015 @ 01:30
    Nicholas Westby
    0

    Hi Jan,

    IIRC, it's not true that the folder name corresponds to the media node ID.

    I think the folder is just the next available one on the file system. In fact, if two devs are running the Umbraco site on their computers against the database, I believe the media uploaded by each of them can appear in the same folders (on their corresponding file systems, of course, but this is assuming that the media would get merged up on later deployment).

Please Sign in or register to post replies

Write your reply to:

Draft