Cannot delete word file in storage

Hi - just using storage api on default directory to delete a file I have uploaded using the same api, but api gives general error.

Can anyone see the issue here -

storageApi.DeleteFile("", “”, “invoice.docx”);

Hi Barry,

Thanks for your inquiry. Please check the following article:

How to Delete a Particular File from Aspose Cloud Storage

Hope, this helps.

Best regards,

Hi Awais,

Thanks for your reply - I think the link you point to is for an older Java api.

I am using the following in my POM:

com.aspose
aspose-cloud-storage
1.0.0
com.aspose
aspose-cloud-words
1.0.0

So, the delete functionality should be

storageApi.DeleteFile("", “”, “invoice.docx”);

but I get an error.

I have no folders setup in cloud storage, so the document is in the default place.

Can you please verify if the frst 2 arguments of the above storageApi call are correct when trying to delete a document in the default area?

Many Thanks,
Barry.

Hi Barry,

Thanks for your inquiry.

As mentioned in StorageApi.java file, the first parameter is path to file, second parameter is version and the third parameter is storage name. Please pass file name as first parameter; for example, if file is on root folder:

storageApi.DeleteFile(“/invoice.docx”, “”, “”);

Hope, this helps.

Best regards,

Work perfect - many thanks Awais