Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
axew3
8 years agoCollaborator | Level 8
Linked files not retrieved with list_shared_links while files exists in dbx and appears as linked
Hi all! Out of contest, i'm on the way to release a new wordpress plugin on wp repo, with a custom chooser (that i maybe will publish on github also, because the chooser is a standalone js piece of ...
- 8 years agoWe'll be happy to look into this, but we'll likely need some more specific information to make sure we have a good understanding of the issue you're describing. Can you share the following:
- the specific steps to reproduce the issue
- the code used in those steps to reproduce the issue
- sample output showing the issue
If you'd prefer to share that privately, you can open an API ticket with it here:
https://www.dropbox.com/developers/contact
Thanks in advance!
axew3
8 years agoCollaborator | Level 8
Ok Greg, i've take a look in various little moments these days, and i've discover that there is a problem with my php recursion function.
The problem: the function work fine on first call, but after fall into a loop after second recursion, that before never was coming out because the code for other reasons was stopped and recursion never happen, so this was the reason of "folders not retrieved".
I ask you forgive me for this big mistake!
I just see now that the first returned cursor for recursion is different by the second logged, but after, the function retrieve ever the same cursor (that's at moment my doubt: i can't understand at moment why, after another curl the function return me another time the previous cursor value, so the recursive function loop because the next files array will be ever the same of before, and
$res_more->has_more
never become false!
This lead to the loop now. Should be easy to resolve, by the way i've still not understand why.
This stupid code i've do more then 2 years ago, is making me crazy. But i'm near to solution i guess! Sorry Greg, and thank you again!
axew3
8 years agoCollaborator | Level 8
Here again for a question:
it seem to me that the cursor return on results, even if the first call not retrieve 200 files?
I remember (maybe i'm wrong) that each curl retrieve 200 files.
So asking me why, if the first call not retrieve almost 200 files, it return by the way a cursor and has_more set as value 1.
???
I'm wrong? I get all working, after i apply a count() to the first call: i then will go to iterate only if files are more then 200, and not if the has_more is false (because it return 1 on first curl even if there aren't more then 200 files). Isn't it?
- axew38 years agoCollaborator | Level 8
So just an hint to all cool people that eventually will fall into my same mess:
1) memo that the cursor ever return, and you need to count retrieved links to iterate or stop the iteration (this is true using http with php curl). I have forget this after long time (+ then 2 years), and i've lost my time behind this stupid thing another time now.
2) memo that maybe error,
PHP Fatal error: Maximum execution time of 30 seconds exceeded
can come out like in my case: set php ini to almost 60 sec, or you'll maybe thought like me, that the code was wrong looping in some part.
I will add a preloader for the curl execution time. I realize it is necessary.My cache class was wrong, and the recursive function was failing in a specific situation.
Just to let know that now all is working like a charm.
... as we like to say: hope this will save an headache to someone else!
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!