Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Srinivas R.1's avatar
Srinivas R.1
New member | Level 1
11 years ago

Getting error while uploading larger files using php dropbox api

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

 

 

27 Replies

Replies have been turned off for this discussion
  • Srinivas R.1's avatar
    Srinivas R.1
    New member | Level 1
    11 years ago

    What is the maximum size we can give, is there any limit for that value.

  • Srinivas R.1's avatar
    Srinivas R.1
    New member | Level 1
    11 years ago

    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

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    11 years ago

    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.

  • Srinivas R.1's avatar
    Srinivas R.1
    New member | Level 1
    11 years ago

    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

     

About Dropbox API Support & Feedback

Node avatar for 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!