I'm working on ngx-doc-viewer in angular and when I'm trying to get a document preview of Docx file I'm getting 404 in one case.
I'm uploading my document to a blob storage and giving that blob URL for the file URL of the document. Normally, If I upload a docx file to blob storage and using that blob URL to get the preview I'm getting the document preview properly When uploaded document normally
But when I edit a document using wps office(not sure if it will happen with other editors also) and immediately upload that document. I'm getting 404 while it is fetching the preview. If I do the preview again after sometime It is loading fine. When uploading immediately edited document.
Any suggestions?
Initially I thought it was due to location Im getting it even before file is completely uploaded but It was working incase I upload a document that was not edited recently so I ruled out that case.
The above error occurs
blob or resource URL
does not exist may cause 404 error.filename
(blob name) you provided indeed exists in your container because blob name is case sensitive.Access level to container or blob
.I tried in my environment to fetch file from azure blob storage and got same error in postman:
Postman:
I tried with proper
Url+SAS-token
, I can successfully fetch files from postman.Reference: Azure Storage Static website error - Resource not found or content doesn't exist - Stack Overflow by Bennie van der Walt.