Closed JulianClemot closed 7 years ago
Hi @JulianClemot , I'll double check the code but I see if(folderToDelete.exists()) { //returns true v3.delete(); //returns a storage exception }
Where is v3 coming from? Why aren't you using folderToDelete.delete()? Also please obfuscate the sig in your sas token 😎 in any future comments
Oops sorry, I meant folderToDelete.delete() in the first place. Just a copy/paste mistake but I'll edit my first post.
The SAS token not being in the query param is definitely the cause here. This looks like a bug in the library when we're building the DELETE call for directories, we're not checking for a SAS token the way we do for the other calls. We'll get it fixed.
Yes, we are planning on doing another release next week to support new server side APIs and will include this fix in that release.
Great. I'll close the issue when the new release is done then. Thanks for the quick feedback.
I am also facing the same issue. Can you please suggest if it is fixed? If yes, in which version?
I'm trying to delete a previously created directory. I've made sure that it's empty and that it exists, but everytime I use the delete function, I'm rejected with a 404 and a
Error Message = 'The specified resource does not exist.'
which triggers a StorageException. It is weird in many ways because I can create directories, create files, even delete files but I can't delete directories.I have a valid SasToken, with
rcwdl
privileges.My connection string is as follows:
FileEndpoint=https://kasne.file.core.windows.net;SharedAccessSignature=sv=2015-12-11&sr=s&sig=xxx&st=2017-08-08T15%3A10%3A20Z&se=2017-08-09T15%3A25%3A20Z&sp=rcwdl
and my shareName is also valid (1d707d905f6b4ccaa27bd665fd528f9c
).Here is the code I use:
This is the response I get when executing the exists() function:
And this is the response for my actual delete request:
I noticed that my SasToken is attached as a query parameter when doing the exists() request and not when doing my delete(), is this normal ? I looked at the Rest api documentation and it seems that the delete call needs a authorization header and I don't know if it's present in the call from the library.