Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Nicolas A.2
9 years agoNew member | Level 1
dropbox chooser question
Hello
Is it possible to use the chooser without the selection window ? I would go myself files parameters
ex : list my dropbox's files -> chooser -> get link
i've already try with the PHP api'...
Nicolas A.2
9 years agoNew member | Level 1
# Include the Dropbox SDK libraries
require_once "./../../../lib/dropbox-sdk/Dropbox/autoload.php";
use \Dropbox as dbx;
$appInfo = dbx\AppInfo::loadFromJsonFile("./../../../lib/dropbox-sdk/app-info.json");
$webAuth = new dbx\WebAuthNoRedirect($appInfo, "PHP-Example/1.0");
$authorizeUrl = $webAuth->start();
$dbxClient = new dbx\Client("XXXXXXXXXXXXXXXXXXXXXXXX", "PHP-Example/1.0");
$accountInfo = $dbxClient->getAccountInfo();
//path exemple for the test
$folderMetadata = $dbxClient->getMetadataWithChildren("/images");
for ($i = 0; $i < count($folderMetadata["contents"]); $i++) {
$path = $folderMetadata["contents"][$i]["path"];
$link = $dbxClient->createTemporaryDirectLink($path);
echo '<a href="' . $link[0] . '"><img src="' . $link[0] . '" /></a><br />';
}
This code works fine but if I list 20 images , the page takes 20 seconds to be displayed.
Do you have a solution ?
thank you for your reply
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!
Related Content
- 4 years agoanonymous