Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I tried executing my php code to download a file from dropbox using dropboxclient.php which shows the below error. The given Download file function works perfectly fine with windows but not with macbook. Can anyone help me in solving the issue.
Myphpcode For download function:
if(isset($_GET['disp']))
{
$test_file = $_GET['disp'];
$dropbox->DownloadFile( '/'.$_GET['disp'], $test_file );
}
<?php
$files= $dropbox->GetFiles("",false);
foreach ($files as $value) {
?>
<a href="album.php?disp=<?= basename($value->path) ?>"><?= basename($value->path)?></a>
<?php
}
?>
Fatal error: Uncaught DropboxException: Could not create file image2.jpeg ! in /Applications/XAMPP/xamppfiles/htdocs/project8/DropboxClient.php:278 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/project8/album.php(109): DropboxClient->DownloadFile('/image2.jpeg', 'image2.jpeg') #1 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/project8/DropboxClient.php on line 278
That library is made by a third party, so we can't provide support for it, and the error here doesn't seem to be coming from the Dropbox API itself. You may want to open an issue for the library instead.
For reference though, that error seems to come from this line. That indicates an issue openining the local destination path. I recommend checking that you have the correct path, and permissions to that path.
Well Thanks a lot Mr.Greg. I have even tried changing the permission for the folder and execute it.. It still gives the same error. COming to the destination path i suppose it takes the home directory automatically when i give the file name coz it worked in Windows like that.
If that's not the case could you plese suggest how a destination path needs to be given for that DownloadFile() function.
Thanks in advance
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!