Support Topics Documentation Slack YouTube Blog

File remove


(Evgeny Tishkin) #1

The documentation says that when a file uploaded, it is saved at: https://api.backendless.com/(application id)/(REST-api-key)/files/(path)/(file name)
But actually when a file is uploaded, FileService returns a slightly different path: https://backendlessappcontent.com/(application id)/(REST-api-key)/files/(path)/(file name)

When I need to delete a file, I need to pass the path and file name, i.e. to exclude
https://api.backendless.com/(application id)/(REST-api-key)/files/

Should I change the https://api.backendless.com constant to https://backendlessappcontent.com so that everything works out correctly? And why get disagreement with the documentation?


(Evgeny Tishkin) #2

A small amendment. FileService saves not at this address
https://api.backendless.com/(application id)/(REST-api-key)/files/(path)/(file name)
but for this
https://backendlessappcontent.com/(application id)/(Code Runner API key)/files/(path)/(file name)

Saving happens through Codeless


(Mark Piller) #3

Hello @Evgeny_Tishkin,

You’re correct, when a file is uploaded it is available via the backendlessappcontent.com domain. The domain should be used only for the download (HTTP GET) operation on the file. For other operations, such as deleting, moving or copying the file you should use the api.backendless.com domain. The discrepancy in the documentation will be fixed.

Regards,
Mark


(Evgeny Tishkin) #4

Hello @mark-piller
Thanks for the reply. I will consider this in my code.