I cannot get the file size before downloading it using either Java code or browser download.
I need to display a progress bar to the user while the file is downloading. It was working about 2 weeks ago, but it suddenly stopped working.
For example, try to download this file in your browser; the browser cannot determine the file size either.
https://api.backendless.com/B952A98C-3AF8-0E07-FF8A-0E72F029D000/93563EC3-61F6-DD90-FFBD-06B1522F1200/files/Manga/Relife/Low/Relife_101.zip
Thank you, in advance
Hello @Amir_Sarraf .
We will try to reproduce your problem and help you. Wait a moment, please.
Amir_Sarraf
(Amir Sarraf)
September 28, 2020, 10:05am
3
We were able to reproduce your problem.
The internal ticket BKNDLSS-22860 is created, we will let you know about solution.
Regards,
Inna
sorry to bother. any news on this?
Hello @Amir_Sarraf
Unfortunately, it is still in progress. We will keep you informed here when it’s finished.
Igor
As a workaround, you can do the following:
Make an API call to get file information: https://backendless.com/docs/rest/file_directory_listing.html With this API you can set a filter that contains filename, this way you will get the info only about the file you need.
The response for (1) contains information about file size, use that when downloading file.
Regards,
Mark
Hello @Amir_Sarraf
Please try adding the following header to your request:
'Accept-Encoding: identity'
Please let me know about the result.