We have moved to GitHub Issues
Created by Roy van den Ekker 21 Feb 2018, 10:00:08 Updated by Roy van den Ekker 22 Feb 2018, 13:19:11
Relates to: U4-7828
Relates to: U4-8949
Relates to: U4-10624
When using an third party file system provider instead of using the default PhysicalFileSystem configuration, I am having problems with the ID used in the media library (either as folder name or filename depending on the UploadAllowDirectories setting). When I replace a file each new version is uploaded with a new ID instead of keeping the old one. This prevents me from using the URL (www.host.com/media/id/image.png hardcoded in HTML. Each upload increments the integer while using default PhysicalFileSystem correctly replaces the existing image with a new version.
Able to reproduce with blank Visual Studio web project.
This is the expected behavior in Umbraco (not saying it's great behavior, but it's "normal" and isn't caused by the file system provider).
The discussion in U4-8949 has some workarounds in it to try.
@sebastiaan If I may ask (hope this doesn't reopen anything), why does the default setup (PhysicalFileSystem) not behave like that? It keeps the numbering intact.
Okay, reading this again, I am unsure what the problem is. You say "Each upload increments the integer while using default PhysicalFileSystem correctly replaces the existing image with a new version."
So it works in Umbraco default but not when this FileSystemProvider is used?
So 1002 became 1003 and when browsing to the old 1002-location, image is unvailable because removed from storage.
Talked/emailed to the UmbracoFileSystemProviders.Azure developer, his plugin is unchanged since 0.57. He cannot recall any changes which could lead to this and pointed my in your direction.
Ha! Well, then:
To set expectations: we don't have the time to investigate this right now, so if you want to dig into the source and provide more details as to why this happens that would greatly improve the timeframe in which this can be solved. :)
No worries. Just the marketeers who have to do some more work right now. I'll see what I can do.
It's not Umbraco. It's a version of the plugin not compatible with latest Umbraco version (it's based on Core 7.1.9 and untested after updates) together with its implementation of GetRelativePath. That one returns "/media" while it should not return that part of the URL. The one in PhysicalFileSystem does it the correct way.
My bad "blaming" the wrong tooling though I get the confusion for the other party too.
Haha! Oh no, we've all been there. :)
So the newest version of the plugin is all good? I'll close this again unless something else needs looking at.
No, plugin is still incorrect. Spent morning debugging plugin and Umbraco after compiling the sources myself. Made my own changes to the plugin code to get it working and mimicking the core implementation.
Backwards Compatible: True
Affected versions: 7.6.0, 7.8.1
Due in version: