Deleting Files

You can view and delete your files at any time using this admin dashboard by clicking on View Files in the left hand nav bar.

You can also delete files programatically using the API.

  1. In the left hand nav bar, click Manage API keys which is nested under Your Files

  2. Click on Generate New Private API Key to generate a public/private API key pair. This will generate a public token and a secret token. These keys are different from the key used to upload files for security purposes. The secret token gives full access to your account, so keep is secret!

  3. Click on "View API Documentation" to jump to the API documentation.

Try out the API with the sample code provided on the documentation page

wget -qO /dev/stdout \
--user "yourPublicKey" \
--password "yourSecretKey" \
https://app.simplefileupload.com/api/v1/teams

If things go well you will recieve a terminal response that shows you your team name and creation date.
It should look something like this:

You can get a list of your files using the endpoint

https://app.simplefileupload.com/api/v1/files

Below is an example of how to hit this endpoint using Postman. You must authenticate your request with Basic Auth (the API keys you created above).

The response will look like:

Delete a file by id or URL

WARNING: A delete request will immediately delete the file.

To delete a file by URL, you will need to send the file url you have saved as the url parameter to the delete endpoint. An example delete request is shown below:

wget -qO /dev/stdout \
--method=delete \
--user "p9ea67c85ebc7a43d765e6125b83e6cc4" \
--password "sbde6eb4206d781dcdfbc" \
"https://app.simplefileupload.com/api/v1/file?url=the_complete_file_url_you_have_saved"

If the delete request is successful, you will receive the following message:
File successfully destroyed

To delete a file by ID, using the api/v1/files/:id format:

wget -qO /dev/stdout \
--method=delete \
--user "p9ea67c85ebc7a43d765e6125b83e6cc4" \
--password "sbde6eb4206d781dcdfbcd" \
https://app.simplefileupload.com/api/v1/files/:id