Copied to clipboard

Flag this post as spam?

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


  • f10x 21 posts 18 karma points
    Jun 30, 2009 @ 02:00
    f10x
    0

    Umbraco media creates folders with random numbers

    Hi all, I am new to Umbraco and am giving this a shot for a website/intranet project.

    I have noticed that Umbraco creates random folders whenever an image or pdf is being uploaded. This makes it difficult to track/edit images. Can this be avoided so that I can have a normal "media" folder with following subfolders "images" "pdf" "doc" where all images, pdfs and doc files can be uploaded without a random folder generated.

    I am using Umbraco 4.0.2.1 and ASP.NET v2

    Am not much of a programmer.

    Working on Umbraco as someone mentioned it is a good CMS once it is all setup.

     

    Thank you for your time and help with this.

    Cheers!

     

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 30, 2009 @ 03:01
    Aaron Powell
    1

    Actually they aren't random, they are the unique ID of the media item in the database. If there was no uniqueness you could easily upload two files with the same name "my-cool-pic.png" and the second overwrites the first.

    There's a setting in /data/umbracoSettings.config which can be used to flatten the folders, so you have ####-filename.png but there is no way to remove the ID from either the file name or file path.

  • Chris Dunn 75 posts 127 karma points
    Jun 30, 2009 @ 04:11
    Chris Dunn
    0

    The media section of Umbraco was intended to allow users to manage images and files using the admin interface so a user wouldn't require direct access to the server in order to upload and organize files.  The directory structure is stored in the database while the files are stored using the file system.  The numbering system is a unique identifier for the image to tie it back to a image reference stored in the database.  This allows a user to reorganize and update files without forcing them to go back through their html and update the references to the new 'path'.  While this works for most websites, some sites with larger amounts of files might require a more 'custom' solution.

    You can still reference files and images outside of the umbraco media system, you just don't get the benefits of the media picker.

  • f10x 21 posts 18 karma points
    Jun 30, 2009 @ 04:45
    f10x
    0

    oh Thank you for your time and help.

    What do you mean by the file system? is this the Physical folder you are refering to?

    e.g. a folder named "images" created on the same level as the "media" "scripts" folder?

    Also, I have observed that a name is required while uploading files to the media folder.

    Is this name generally the name of the file e.g. my_questions.pdf or is it like "pdfs"

    Once again thank you for taking the time to help.

     

    Kind regards,

     

  • Chris Dunn 75 posts 127 karma points
    Jun 30, 2009 @ 05:33
    Chris Dunn
    1

    The images folder is for images associated with stylesheets and templates etc.  The media folder stores all files associated with the media section, where end-users can choose files using the media picker and upload files using the media section.  By file system I mean it stores the file on the server rather than in the database.

     The name you enter when uploading a new file is a 'friendly name' to help you identify the file when displayed in the media section or a media picker which might be different from the name of the file you upload.  So when you create a new file in the media section and name it 'My Questions' and upload a file called 'my_questions.pdf', umbraco creates a new record in the database with id of (ex: 94) with the 'friendly name' and creates a new folder in the media folder of '94' which is where is stores the file 'my_questions.pdf'.  If you go back later and upload a new file for the same 'My Questions', ex: 'my_questions2009.pdf', it stores and references that file, still in the '94' folder.  That way if the actual file changes periodically, you can simply upload a new file for the same 'My Questions' and umbraco references that instead.  So all references on your site to 'My Questions' automatically use the new file you just uploaded.  

    In umbraco a 'file' you create in the media section (stored in the database), references a physical file  (file system).  If you have a collection of pdfs you would create a 'folder' in umbraco media section called 'PDFS' and under the folder you would create the file 'My Questions'...and then any others.

     

     

  • Bridgette 3 posts 24 karma points
    Jul 21, 2014 @ 19:57
    Bridgette
    1

    Has media storage changed with Umbraco 7?  Our content editors need to manage PDF documents in a standard location and frequently overwrite old versions -- without creating a new path. So instead of automatically creating a numbered folder like this:

    /media/1076/filename.pdf

    ... we need something like this:

    /media/docs/filename.pdf
    /media/img/photo.jpg
    etc.

    Is this doable in the latest version? 

    Thanks!
    bridgette 

Please Sign in or register to post replies

Write your reply to:

Draft