Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi There,
We have used PHP Dropbox API
to upload files to Dropbox account. But while uploading larger files (500MB from localhost (apache)) we are getting the following errors.
Can you please look into this and help me out on this ASAP.
Error
Fatal error: Uncaught exception 'DropboxException' with message 'cURL-Error (56): SSL read: error:00000000:lib(0):func(0):reason(0), errno 10053' in D:\wamp\www\dropbox_api\DropboxClient.php on line 534
Please help us ASAP. Thanks for your help in advance.
Thanks,
Srinivas Reddy .A
Thanks Steve, can I change the "$DEFAULT_CHUNK_SIZE" value to some high than 4MB, is that works if I change that value.
I recommend using https://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/class-Dropbox.Client.html#_uploadFileChunk.... You can specify the chunk size you want there.
What is the maximum size we can give, is there any limit for that value.
From https://www.dropbox.com/developers-v1/core/docs#chunked-upload:
"Chunks can be any size up to 150 MB."
Hi Steve,
I am using while uploading a video using uploadFileChunked() method but we got the below error. Can you please help me on this.
Fatal error: Uncaught exception 'InvalidArgumentException' with message ''inStream' has bad type; expecting resource, got boolean' in /var/www/vhosts/dev.loveu.evanmarckatz.com/dropbox_api/lib/Dropbox/Checker.php:22 Stack trace: #0 /var/www/vhosts/dev.loveu.evanmarckatz.com/dropbox_api/lib/Dropbox/Checker.php(27): Dropbox\Checker::throwError('inStream', false, 'resource') #1 /var/www/vhosts/dev.loveu.evanmarckatz.com/dropbox_api/lib/Dropbox/Client.php(377): Dropbox\Checker::argResource('inStream', false) #2 /var/www/vhosts/dev.loveu.evanmarckatz.com/testimonialSubmit.php(130): Dropbox\Client->uploadFileChunked('/Wildlife.wmv', Object(Dropbox\WriteMode), false, NULL, 52428800) #3 {main} thrown in /var/www/vhosts/dev.loveu.evanmarckatz.com/dropbox_api/lib/Dropbox/Checker.php on line 22
The file size is 25MB but we received the above error. Please help me on this ASAP.
Code here: http://www.codesend.com/view/874cccb8c6723e9a92f9f323c612594d/
Thanks,
Srinivas Reddy .A
The error message is: "'inStream' has bad type; expecting resource, got boolean'". That's indicating that $inStream, the third parameter to uploadFileChunked, per the documentation, which is supposed to be a resource, was actually a boolean. In your code, you're giving the variable $f for that parameter, so you should check why that isn't the type you're expecting.
You're getting your $f via fopen, and the documentation for that says:
"Returns a file pointer resource on success, or FALSE on error."
So, it's likely that fopen is failing with some error that you need to handle/resolve, causing to $f to be false.
By the way, for the sake of security, you should disable that access token now that you've shared it publicly. You can do so by revoking access to the app entirely, if the access token is for your account, here:
https://www.dropbox.com/account/security
Or, you can disable just this access token using the /disable_access_token endpoint:
Thanks Greg, the issue is from my side and there is limit to upload file to 5MB max size. But I am uploading 25MB file, so its giving error. Finally we increased the size and its working as expected.
Also, we have disabled the token and using the new token.
Thanks
Srinivas Reddy.A
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!