We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
raziel79
8 years agoHelpful | Level 6
How to check if filezip is too big to download in shared link
Hi allo, with JS api i have create a function that use sharingCreateSharedLink for create a shared link and redirect user with ?dl=1 fro download it. But if zip is too big the user exit from my a...
- 8 years ago
so greg, this dropbox api offer very very basic functionalities but i found a way to do that:
1. pass download path to my php sdk
2. using listfolder api with recursive set to true
3. reduce results entries with array_reduce php function to sum file size in bytes
4. check with dropbox filesize limit (20 gb + 10000 files count)
5 and return status of check, if sum of files is to big or files count is greater than 10000 files
i hope to be usefull for someone
Best
raziel79
8 years agoHelpful | Level 6
thx greg is there another mechanism?
raziel79
8 years agoHelpful | Level 6
so greg, this dropbox api offer very very basic functionalities but i found a way to do that:
1. pass download path to my php sdk
2. using listfolder api with recursive set to true
3. reduce results entries with array_reduce php function to sum file size in bytes
4. check with dropbox filesize limit (20 gb + 10000 files count)
5 and return status of check, if sum of files is to big or files count is greater than 10000 files
i hope to be usefull for someone
Best
- Greg-DB8 years ago
Dropbox Community Moderator
Thanks for following up with that. Yes, that would be the way to manually figure this out using the API. Apologies there isn't a more direct way of doing that!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!