Closed fverneau closed 11 months ago
I added this feature in master (you need to download github repo).
Here is how to do it (exactly like list/download/upload):
QNetworkReply* deleteFileReply = azure->deleteFile(container, azureFilenameToDelete); (...)
https://github.com/QuentinCG/QAzureStorageRestApi/blob/master/example/main.cpp#L139
Can you please confirm it works ?
There are errors in QAzureStorageRestApi.cpp (lines 234 and 235) :
request.setRawHeader(QByteArray("Content-Length"),QByteArray(QString::number(contentLength).toStdString().c_str()));
request.setRawHeader(QByteArray("x-ms-blob-type"),QByteArray(blobType.toStdString().c_str()));
contentLength and blobType aren't declared
QAzureStorageRestApi.cpp - line 237 :
return m_manager->delete(request);
I think it would be :
return m_manager->deleteResource(request);
it should work now (sorry, I don't have access to a compiler to test the source code I edit right now)
Can you confirm it works ?
I confirm : it works very well ! When a file is in subdirectories, the subdirectories are deleted too. Perfect !
We can upload and download file in blob container, but would it be possible to have a function to delete a file in a Blob Container?