Copied to clipboard

Flag this post as spam?

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


  • Danny dineen 12 posts 91 karma points
    Jul 11, 2018 @ 20:02
    Danny dineen
    0

    I understand the correct way to reference media files so when media files are replaced no broken links will occur. This is fine for code that runs from an Umbraco MVC view. The issue I am facing is that our editors wish to upload media files and distribute the media link for use in other distribute content mediums that Umbraco does not control. When a media file in Umbraco is replaced the numerical folder is changed and that will break all distributed links to that media file outside of Umbraco.

    Is there a special way to handle replacing media files in Umbraco so that the URL will not change at all? For now we are using the URL tracker plug in and creating redirects for any updated and distributed media links; as a work around.

  • Jan Skovgaard 11152 posts 22816 karma points MVP 5x admin c-trib
    Jul 11, 2018 @ 20:10
    Jan Skovgaard
    101

    Hi Danny

    If I understand the issue correctly then I think you will actually need to find the media item in the media section and click on "Remove file" and then upload the new file, which will replace the old one. The new file will of course also need to have the same file-name as the old file that is being removed has. That way the url should remain the same and the file will be uploaded into the same id named folder.

    But it's a bit of a tedious process if it's something that needs to be done for many files of course.

    /Jan

  • AIDR Online 2 posts 72 karma points
    Aug 10, 2018 @ 06:19
    AIDR Online
    0

    Hi Jan, this doesn't work unfortunately. The link listed under the "Info" tab remains the same, but results in a 404. A new URL with a new number is created for the updated version, and we still have to manually update wherever it's linked on the website.

  • Jan Skovgaard 11152 posts 22816 karma points MVP 5x admin c-trib
    Aug 19, 2018 @ 18:05
    Jan Skovgaard
    0

    Hmm - Ok, so I just did some investigation on this and here is what I learned.

    If you're using the grid to insert an image then you're in fact right that the image change will not happen if you swap the image on the media item. I had to also re-select the image in the grid.

    However if one is using a media picker not using the grid then the updated image is visible once it's been swapped and the page has been refreshed.

    Even though as you say that the url does not change for the item, the correct url is being fetched in the last scenario.

    I'd say that the missing change of the links in the info tab is a bug and perhaps that's why the grid image is not automatically being updated.

    I'll try to ask about this in the Gitter chat to figure out whether to report this scenario as a bug or not.

    EDIT: I did this test on Umbraco 7.11.1 - Don't know if the behavior is the same on older versions but I suspect that it probably is. And I'm 99% certain it's the same on 7.12 :)

  • Jan Skovgaard 11152 posts 22816 karma points MVP 5x admin c-trib
    Aug 20, 2018 @ 10:50
    Jan Skovgaard
    0

    Ok, so a quick follow up!

    I just tested this on an older Umbraco version (7.7x) and when I swap the image then the url on the "info" tab does in fact change too.

    So in some version after the 7.7 release this bug has been introduced. Perhaps it happened after the "Properties" tab was renamed to "Info" for some weird reason :)

    However the image in a grid editor does not change. So that might either be expected behavior or another bug.

    I hope it all makes sense - I'll file an issue about this and linke to it from here at least.

    EDIT: The bug is reported here now http://issues.umbraco.org/issue/U4-11587

    /Jan

  • Danny dineen 12 posts 91 karma points
    Jul 12, 2018 @ 23:42
    Danny dineen
    0

    Thank you for your answer.

    I wish there was a way we could move a file into a physical media/{id} folder to recover the path of files when the correct procedure is not followed; from within Umbraco.

Please Sign in or register to post replies

Write your reply to:

Draft