The data browser is built for Chrome, Firefox, Safari, and IE9 and above. Please upgrade your browser, or download Google Chrome to get the best experience.
Back to Questions

How can I delete a file?

6 votes     1 answer     12.5k views     

6

1 Answer

-3

Deleting an object will not delete any file that is referenced by any of its columns.

You may delete a file through the REST API. You will need to provide the master key in order to be allowed to delete a file. Note that the name of the file must be the name in the response of the upload operation, rather than the original filename.

    curl -X DELETE \
        -H "X-Parse-Application-Id: <YOUR_APPLICATION_ID>" \
        -H "X-Parse-Master-Key: <YOUR_MASTER_KEY>" \
        https://api.parse.com/1/files/<FILE_NAME>

Clean Up

You may have files which are not referenced by any object in your app, in which case it is not possible to delete them through the REST API. You may request a clean up of these unused files in your app's Settings page. Keep in mind that doing so might break any functionality which depended on accessing unreferenced files through their URL property. Files which are currently associated with an object will not be affected.

How to delete all files that I have uploaded onto parse? Or, delete a file after uploading is done ?

- Bharath about 1 year ago

You should be able to delete a file using the PFFile class in code, a strange omission! Please add this functionality, I shouldn't have to add a REST interface or occasionally press a clean up button!

- moneybudgie about 1 year ago