Copied to clipboard

Flag this post as spam?

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


  • Roy van den Ekker 3 posts 73 karma points
    Dec 14, 2017 @ 13:59
    Roy van den Ekker
    0

    Unwanted change of link to media

    We are having problems with changing media links when replacing (re-uploading) an existing media file. Our marketeers use this URL in several HTML pages and other communication. They are used to only replacing the image, with the URL staying intact.

    Each uploads seems to create a new folder on the storage location (AzureFileSystemProvider/blob storage) and deleting the old one. This works fine in 7.5.13, now it looks "broken" in 7.7.6. Unfortunately thats our upgrade path, so no versions in between.

    Before: enter image description here

    After: enter image description here

    (Note: the gap in the folder name is because of uploads of other images. If I would upload another one, folder would increase by 1)

    Umbraco CMS is used on a "master" on premise server, with two other Azure VM servers doing frontend work.

    Configuration files haven't been changes, unless instructed in the upgrade guides.

  • Søren Tidmand 100 posts 211 karma points
    14 days ago
    Søren Tidmand
    1

    Hi Roy,

    It seems that Umbraco 7+ is handling upload of a new version of a media file (same name) differently than before 7 (probably until 7.5).

    In earlier versions of Umbraco Media section it was possible to "re-upload" a new version of a media file (with identical name) directly to the existing media node, but this has changed. Now you need to remove the original file to be able to upload the new ... AND now the new upload does NOT keep the old folder-ID, but instead Umbraco assigns a new folder and folder-ID.

    Since the original version of the media file is not being deleted from the server it will still be accessible.

    Example: Original link to media file /media/1040/documentation.pdf New link to media file after "re-upload" of the updated version with identical filename to the same media node /media/1134/documentation.pdf

    This can be a big issue if you're referring to a documentation pdf or image download with static links - and maybe even when using the media picker.

    I've reported the issue on a similar thread in Umbraco Issue Tracker.

    /Søren

  • Roy van den Ekker 3 posts 73 karma points
    14 days ago
    Roy van den Ekker
    0

    Hi Søren,

    In my case the old media/image actually gets deleted from the Azure blob storage. In 7.7.6 you don't really need to delete the old, the "choose file" option is still there. I expect it to replace the existing version with keeping the URL intact. As it did before.

    Same problem when you use the media picker, as far as I know. Did see an issue where someone request to update all media links when replacing an image. Don't know how one would achieve that, but that's a different problem. We use the URL like you said, somewhere "hard coded" within a RTE or external web page.

  • Søren Tidmand 100 posts 211 karma points
    14 days ago
    Søren Tidmand
    0

    Hi Roy,

    I totally agree with you that the re-uploaded file will need to overwrite and stay in the "old" folder, so that the URL is being kept intact.

    I believe that the issue in the Umbraco Issue Tracker is similar to your (and my) problem with relocating the media file, so please vote if you feel for it - http://issues.umbraco.org/issue/U4-10624 - let's cross fingers ;-)

    /Søren

  • Roy van den Ekker 3 posts 73 karma points
    1 week ago
    Roy van den Ekker
    0

    I gues it might related to changed in MediaFileSystem, because of the guid thinks. Class is completely different compared with 7.5.13.

    https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Core/IO/MediaFileSystem.cs#L140

    Though looking at that I don't see why it goes wrong in our case. Maybe related to external sources or settings we don't know about. Think it actually execute GetNextFolder while it shouldn't.

    GetMediaPath is called from: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs Also cleanup happens over there.

Please Sign in or register to post replies

Write your reply to:

Draft