Downloading a File via the Backendless Console¶
To download a file:
- Log in to Backendless Console and select the application containing the file.
- Click the Files tab on the left menu.
- Locate a file you want to download. Click the Download file icon.
Downloading a File via API¶
Downloading a file from the Backendless file storage is the basic HTTP GET operation. The operation should use the same URL which Backendless returned as the result of the file upload operation. Alternatively, if the file was uploaded manually using the console, the URL can be composed using any of the following approaches:
- Using Backendless native domain for the file repo:
North American cluster:
https://backendlessappcontent.com/<application id>/<REST-API-key>/files/<path>/<file name>
European Union cluster:
https://eu.backendlessappcontent.com/<application id>/<REST-API-key>/files/<path>/<file name>
||ID of the application which can be obtained from the Manage > App Settings screen of the Backendless Console.|
||REST API key assigned to the application by Backendless. The key is available from the Manage > App Settings screen of the Backendless Console.|
||Directory path where the file is saved.|
||Name of the file.|
- Using a custom domain. You can configure a custom domain for your Backendless application in Backendless Console (Manage > App Settings > Custom Domain). When a custom domain is assigned to handle File Repo access, the URLs of your files are structured as shown below:
For the files located in the /web directory of the file repository, the URL has a simplified structure:
Files fetched with the URL scheme defined above are subject to the security constraints and permissions established by the application developer. See the Files Security section for additional details on how to secure file storage. Fetching a file secured by an access control list (ACL) policy requires an additional HTTP header in the request:
||a value identifying currently logged in user (if any). This is the value received in the response for the login API request. The token uniquely identifies the user and the roles associated with him. It is used by Backendless to establish user's identity for all operations where the token is present. It is necessary in order to determine permissions applicable to the user and the roles associated with the account. This header is optional.|