We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Nickolas S.
11 years agoNew member | Level 1
Wufoo -> Dropbox -> Webapp - How to get user uploaded files from the directory in a gallery montage?
Greetings
I'm using Wufoo (a form design app - basiclly a form) so user can upload their photo into the form. Those pictures are stored in Dropbox.
I want my website (a PHP file) to be able to get those images, crop them and display them in a nice format (some mosaic gallery of the photos). User would then be able to see the other user-uploaded photo...
Is there already something coded for that? I would need a little help on getting that to work.
Thanks!
Regards,
Nickolas Simard
12 Replies
Replies have been turned off for this discussion
- Nickolas S.11 years agoNew member | Level 1
Since Wufoo only have Top level folder integration...
It just occured to me: Can I also grab the content of another folder, NOT located under the Apps folder? - Greg-DB11 years ago
Dropbox Community Moderator
I'm not too familiar with the Wufoo Dropbox integration itself, but my understanding is that it accepts files uploaded to your form and puts them in your Dropbox. It sounds like you then want to get those files from your Dropbox and display them on your site in a mosaic. This would certainly be possible using the Core API, which enables API apps to retrieve files from Dropbox accounts from any folder. Since you're using PHP, we recommend using the official PHP Core SDK. We don't have any samples already coded in PHP that do exactly that, but you can get started with the following resources:
https://www.dropbox.com/developers/core/sdks/php
https://www.dropbox.com/developers/core/start/php
http://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/ - Nickolas S.11 years agoNew member | Level 1
How can I change the target folder for the retrieval of users' uploaded photos?
The only thing I did so far was manage to skip the oAuth process by hard-coding the accesstoken. Upon refresh my PHP file, it reuploads the "working-draft.txt" files.I'll get to reading those docs... but not much "script example" are shown.
- Greg-DB11 years ago
Dropbox Community Moderator
What making an API call, e.g., using
getFile, you can specify the full path to the desired file. E.g., from the PHP Core SDK tutorial, I might change thegetFileline to:$fileMetadata = $dbxClient->getFile("/Form1/image.jpg", $f);In this case, I'm downloading image.jpg from the Form1 folder.
- Nickolas S.11 years agoNew member | Level 1
I can't seem to be able to "list" the files of a particular folder located on the Root of my dropbox account.
The Path is Valid, but perhaps my App doesn't allow access to this part of my account. How can I fix this? - Greg-DB11 years ago
Dropbox Community Moderator
I'd need to see the error or output to say with more confidence, but it sounds like your app is registered for a more restrictive permission than you need. (E.g., maybe you registered for "app folder" when you need to access other files outside the app folder.) You can find more information on the different app permissions here:
https://www.dropbox.com/developers/reference/devguide#app-permissions
If you need to register for a different permission, you can do so here:
- Nickolas S.11 years agoNew member | Level 1
In fact, my Wufoo uploaded files are outside of the App folder. Do I need a Full DropBox access (All file type checkbox) or the Specific File types one?
- Greg-DB11 years ago
Dropbox Community Moderator
Either full or file type access would allow your app access to files outside an app folder, so whichever you prefer.
- Nickolas S.11 years agoNew member | Level 1
Great!
I managed to list all the images of my wufoo upload folder into PHP...Do I have to specifically download every file to my own server or can I directly link to those?
- Greg-DB11 years ago
Dropbox Community Moderator
That's one way, or you can use the
createTemporaryDirectLinkmethod to get a temporary link to the file contents without downloading the contents to your server itself:
About 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!