Closed ddprince-pro closed 1 year ago
Hi there @ddprince-yaksa!
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:
I've moved this to the issuetracker that's specific to the blob storage provider.
I think what you're saying is that the URL is wrong and you get /media/media
in it? Maybe that's an accidental default being left behind, or maybe the intention of ContainerName
is different from what it looks like, not sure.
Pinging @ronaldbarendse on this one.
Thanks @nul800sebastiaan , this is indeed what happens. One thing to note, I've voluntarily set the ContainerRootPath option to an empty string, because otherwise I would face the same issue but for almost all files on the site (/media/media
in file path).
Hope this helps!
This is expected behaviour, because _webHostEnvironment.WebRootFileProvider
uses a CompositeFileProvider
that delegates the /media
folder to the media file system without including this prefix (so /media/%uniqueid%/myfile.pdf
will request %uniqueid%/myfile.pdf
from the underlying AzureBlobFileSystem
). If you're interacting with the media file system directly, you need to ensure the custom media path prefix is removed.
Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9
10.1.0
Bug summary
Starting only with a media GuidUdi, we can't use IMediaService in conjonction with MediaFileManager to obtain a raw file stream. The underlying IFileSystem, which is an AzureBlobFileSystem at runtime, is always throwing an exception (404 Blob Not Found). In the end, instead of looking for a file, say, ~/media/%uniqueid%/myfile.pdf, the AzureBlobFileSystem is looking under the following path: ~/media/media/%uniqueid%/myfile.pdf. More details over the following sections.
Specifics
The following packages are installed within the site project:
AddAzureBlobMediaFileSystem has been called so that the proper services are added during initialization.
appsettings.json configuration for the Azure Blob Storage:
No other customizations.
Steps to reproduce
Use this controller and try both actions. WorkingDownload will work and NotWorkingDownload will not work.
Expected result / actual result
Not receiving a 404 error.