Copied to clipboard

Flag this post as spam?

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


  • Jonas Nilsson 137 posts 260 karma points
    Apr 04, 2014 @ 10:55
    Jonas Nilsson
    0

    Upload/replace files under Media

    Hi!

    I have a media folder with product images that the customer need to update regularly.

    How can I upload files/images under media and replace the files with the same name?
    Now I get file names with prefix like "1.png (1)"

    Can I configure this?, shouldn't there be a warning dialog?

    /Jonas

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 04, 2014 @ 17:10
    Lee Kelleher
    0

    Hi Jonas,

    I believe this was done by design, so that anything linking to the previously uploaded media/images wouldn't have a broken link.

    In order to replace a media item's image, you can tick the "Remove file?" checkbox before uploading the new file/image.

    Cheers,
    - Lee

  • Robert Barnett 1 post 22 karma points
    Jul 03, 2014 @ 21:02
    Robert Barnett
    1

    Brand new to Umbraco here.

    I have a similar situation as Jonas, client will need to update images. Let's say I have an image inserted into the body text field of a page and I have to update it. If I look at the source in the RTE it says the physical path is /media/1001/sag_summary.jpg. But in the Media manager in the backoffice I have the image in a subfolder of Media, something like this: "Media > MySubfolder". If I go to update the image I run into these issues......if I select "remove files" it deletes the image but creates a new physical path (breaking the image link in the page -  it shows in backoffice as the same "record" but creates another physical directory, for instance /media/1008/sag_summary.jpg. So now the image link that was inserted into the body text is broken because the system still has /media/1001/sag_summary.jpg). If I just try to upload a new image to overwrite the old one the system leaves the old thumbnail so the old image still shows up in the system. 

    Is there a way you can turn off the system placing images in numbered directories like this so pathing doesn't get broken? Or more specifically, can I create subfolders under "media" where I can dump images and the system won't touch my directory structure?

    I'm using the latest version of 7, downloaded a few days ago.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 03, 2014 @ 22:02
    Dennis Aaen
    0

    Hi Robort and welcome to our.

    I have just tried what you are described in your post and it´s correct that if you choose to remove the file and upload a new file, it will get a new physical path to the image.

    Then you´re talking about the update option, and for me it would be the right thing to do, when you use the update option it dosen´t get a new physical path, but keeps the old path so you would not get broken links to image.

    Then you are saying that you have some problem with the thubnails, dosen´t update, and therefor you are still seen the old once. I have just tried to update an image, and I get the new thumbnail, in the preview, when you upload an image and in the overview of images in a folder or in the media section it self.

    I am using Umbraco version 7.1.4 assembly 1.0.5261.28127

    /Dennis

  • Søren Reinke 158 posts 206 karma points c-trib
    Jul 09, 2014 @ 07:26
    Søren Reinke
    0

    I had sort of the same problem as you, and Sitereactor made the example, that with a few tweaks help a lot :)

    https://gist.github.com/sitereactor/04ffad4d173f2aac7667

    My changes to the code, just give the image/file the filename entered as a name in the media node.

    So if the editor uploads a file called DSC_0823.jpg and calls it 'Product' the filename on disk will be '/Media/1234/Product.jpg'
    As long as the 'name' in umbraco backend is not changes, every new upload on the same media node, will get the same filename.

     

Please Sign in or register to post replies

Write your reply to:

Draft