You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
axew3
7 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 ...
- 7 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!
Greg-DB
Dropbox Staff
We'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!
- 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
7 years agoCollaborator | Level 8
Hi! Absolutely yes thank you! Honored ;)
I will do within today or tomorrow if the sky not fall down here ... i hope within today ...
But i need then to send you the entire plugin code.
The plugin use php for delete, unlink, list_shared_links, or create folder curl, while use the added dbx custom chooser, iframed onclick, to display the simple JS uploader.
This part, is the one that i'll like to start to develop, to be exactly (i will try with my simple JS code!) like the actual native dbx chooser is. At moment, it only upload any file on the folder where it is called, display progress bars, and also this part can be improved further more, where files are smaller then the min file size: when the file isn't chunched for upload, the progress bar fill to 100% in one time as soon the sharingCreateSharedLinkWithSettings finished. It is also easy to add a preloader for the file in this case (as it is on actual dbx chooser for uploaded files if i'm not wrong): the actual native dbx chooser just upload one by one files presenting related little preloader for the actual processed uploading file, and push it on list when upload finish, then follow with all other queued files ... which is to better way?
In effect i note that sometime, the upload fail with some file, but maybe this is because i've set the chunk size for testing purpose to 1mb and not to 8mb like dbx suggest. So sometime the "too many write requests" error occour. these errors are chatched and resolved in a simple way at moment, that can be really improved.
Will be easy to remove WP added parts and add any needed feature more via javascript (and will be githubbed): the custom chooser will add navigation to upload files into any folder like native chooser, the files chooser selection etc.
The actual code, like on the github example, automatically start to upload files when selected, on the folder where you are on, then reload cache and page automatically when upload queue finished.
I have choose this way because initially i would like to release two versions, the free and not free ... you know ... but i will switch the intention to be only free version.
Funny that in the not free version, i was using the native dbx chooser, implemented on code in a strange way and working like a charm! But as said, and for this hte reason of custom chooser, the native dbx chooser require to add the domain for the site where it run on. And this is not possible for a free plugin presented at wordpress dot org repo.
I will try to send it to you with all explainations to make you up and running within the mess, because in true, the plugin has been coded more then 3 years ago if i'm not wrong, and it present many aspects that now i would like to rewrite in a complete different and more efficient way. I will do soon. I had overcomplicate many steps on php and using elementary js code concepts at this time, that now looks like newbie mistakes to me.
Now i have a better and much more clear idea about how all things need to be coded.
Let me finish with some little garbige and i'll send it immediately. Thank you Greg!
- Greg-DB7 years agoDropbox StaffPlease try to reduce the code down the minimum amount needed to demonstrate/reproduce the issue. Thanks!
- axew37 years agoCollaborator | Level 8
Unfortunately the code is within a plugin, it will require too much time to remove all things doing a standalone more short version of all (except the part about upload that is substantially an html/js file): easy, but too long! i will send the entire plugin, that need to be installed into a wordpress to work. If possible you'll maybe take a look into the two main php files i will indicate, that are containing the code that execute php curl calls. But i assume it do the work correctly, since normally it work fine and this behavior only sometime happen, but maybe i'm wrong.
I'm just experiencing right now the issue reported and another time i see this:
Using a full dropbox access, i had a single folder named wtest, linked on sharing: i have upload 9 files on root (but the same result happened last time doing a deletion inside a linked test subfolder, so not root).
Then i have curl to delete these 9 files.
Result: next curl to list_shared_links, return nothing.
No reason looking into axew3 dbx account via browser, because the folder wtest apparently result as linked and anyone with the link should have access to it. A curl should return it, instead it is ignored. I've leave this folder wtest in this state if anyone would like (or have the power to) to take a look into this folder setting. It result as linked, but is not retrieved.
wtest folder about link setting result as follow:
Who can view this link? -> Anyone with the link can view
I'm quite sure that if i go to unlink the folder and to re-create the link, then the folder will return available like last times this is occurred. At moment i've leave the folder wtest in this state, creating a new folder testme and creating the link for it. It is correctly retrieved, while the wtest folder is not. I so assume that is a problem that happen on files deletion.
Sorry for the delay on posting the code to you, hard time here due to "no coding" reasons. I'll be over as soon i can.
- axew37 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!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,882 PostsLatest Activity: 5 hours agoIf 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 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!