Open Attackmonkey opened 3 years ago
Additional info, even if you have only a single level and you don't use "media" as the prefix, things break. For example, using the virtual media provider:
It seems like there's some issue between Umbraco and the S3 provider. If we're serving up the image on "/media/ghfgfg/myfile.jpg", I'd expect what's in the database against the media to match that, or for the link that IS saved to actually work.
Looking at the code, the bit that configures the virtual path provider seems to be hard coded to "media".
OK, the main issue seems to be that the virtual path provider always resolves to "/media". If you have it use the bucket prefix like the older V7 one did, and set up a folder with the same path with the special web.config in like you would have with the normal /media paths, then everything works as expected, albeit the local paths have to match the bucket one.
If you have the media stored in anything more than one level deep, we get some interesting issues. In our client's environment, several sites share a bucket, and they store the files like /project-name/media/.
In the web.config file we set the prefix like so:
<add key="BucketFileSystem:MediaPrefix" value="PR1802/media" />
When we UPLOAD the media in the back office, the files upload to the bucket OK, but the media files are stored in Umbraco as /PR1802/media/asdasdasd/myfile.jpg, which obviously means they break in the back office. If you go to the URL, and manually remove the /PR1802 part, the image is loaded by the virtual file system as expected.
Is there a way to get this to work? I can hack my way round it with IIS rewrites and a custom media URL provider for the front end, but it would be good if this could be made to work out of the box.
To Replicate: