Jump to content


Photo

Dropbox API using PHP (via dropPHP) download error


  • Please log in to reply
1 reply to this topic

#1 stealthrt

stealthrt

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 29 March 2014 - 05:00 PM

I am currently using the sample.php page provided with the code here.

Now it does create the access token just fine.

It also shows my account info as it should be.

It finds all the file directory's in the "files array" part.

It can upload a test image just fine to dropbox.

It can get all the meta data for current images in my dropbox folder.

However, I can not seem to download the images from dropbox!

 

The error i get once it gets to this code:

echo "\r\n\r\n<b>Downloading $file->path:</b>\r\n";
print_r($dropbox->DownloadFile($file, $test_file));

Is this below:

( ! ) Fatal error: Uncaught exception 'DropboxException' with message ' in C:\wamp\www\test\DropboxClient.php on line 634 

( ! ) DropboxException: Could not retrieve meta data from header data: Array
(
    [0] => HTTP/1.1 404 Not Found
    [1] => Server: nginx
    [2] => Date: Sat, 29 Mar 2014 18:07:54 GMT
    [3] => Content-Type: application/json
    [4] => Transfer-Encoding: chunked
    [5] => Connection: keep-alive
    [6] => 
)
 in C:\wamp\www\test\DropboxClient.php on line 634 

Call Stack 

# Time Memory Function Location 

1 0.0016 156816 {main}(  ) ..\sample.php:0 

2 1.0901 343472 DropboxClient->DownloadFile(  ) ..\sample.php:80 

3 1.4278 344872 DropboxClient::getMetaFromHeaders(  ) ..\DropboxClient.php:223 

I'm not sure where i am needing to check out (either in the code or on the wamp side) in order to correct this issue above?

Any help would be great!


Edited by stealthrt, 29 March 2014 - 05:09 PM.


#2 Psycho

Psycho

    Advanced Member

  • Gurus
  • 10,964 posts
  • LocationCanada

Posted 29 March 2014 - 08:07 PM

Did you consider asking the author of that API?


The quality of the responses received is directly proportional to the quality of the question asked.

I do not always test the code I provide, so there may be some syntax errors. In 99% of all cases I found the solution to your problem here: http://www.php.net




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com