Reputation: 15229
I have an application that manages Attachments
associated to a Post
. I need to GET
and also DELETE
them.
The attachments are grouped in Azure Blob Containers (a container per Post). I try to use the Azure API to delete it, but it says does not found (404).
but the DELETE does not work
The Access Policy of the "000001" container is "Container (read access for containers and blobs)"
The CORS access allows to DELETE for the presented origin.
Here are another HTTP Headers from localhost:
Upvotes: 0
Views: 654
Reputation: 136196
The reason you're getting this error is because a Delete Blob
request can't be anonymous (a Get Blob
request can be anonymous depending on the blob container's ACL).
What you would need to do is either create an Authorization
request header and include that in the request (which is not recommended considering you're making an AJAX call and you would have to expose your account key on the client side for that) or use a Shared Access Signature (SAS) URL
with Delete
permission included in the SAS.
Upvotes: 2