Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Just 1 hour after 00 of the last day on 2016 ... Happy New Year to all! Finally 2017 is coming!
My last 2016 problem 🙂 ... maybe as always due to the fact i've not well read/understand something ...
I found that calling create_folder to create a folder on ROOT naming the folder like this, with the ' char inside:
/my''''folder
all work as expected. The folder is created, and shared immediately correctly.
But if after i navigate inside the created folder my''folder, and i try to curl, to create inside it another folder, naming it with or without a char ' inside, so for example, we will have something like:
/my''''folder/mysec''ond''folder
or /my''''folder/mysecondfolder
The folder is correctly created in dropbox. But will not result as linked/shared immediately.
some conflict that i should know exist, or why this behavior?
[EDITED]
$data_s = stripslashes($data_s); $data = '{"path":"' . $data_s .'"}';
$data now contain the follow:
{"path":"/dfgdfdf'''fgff/gdgdfgdg'''gfff"}
or
{"path":"/dfgdfdf'''fgff/mysubfolder"}
$data is so passed to CURLOPT_POSTFIELD
while CURLOPT_HEADER contain :
Array ( [0] => Authorization: Bearer hsQbEz.................lhyP_EsRPf..........d1XkgMdJ.........fdgdgf [1] => Content-type: application/json )
Yes i know you can imagine the above. But in effect it is just passed simply in this way. The sub-folder willbe created, but not shared.
The same happen also if the subfolder to be created inside the folder
/dfgdfdf'''fgff
do not contain chars like '.
I could name it also aaaaaaa: will be created, but if it is subfolder of
/dfgdfdf'''fgff
won't be shared.
I would like to post entire code, but as it is on the way to be released as part of a plugin in these days, maybe is possible to post it somewhere else?
Well what shame .... how i can say ... ah yes! this is my stupid mess ... i had a call, separated, to create_shared_link_with_settings that i've forget to check for proper sanitization ... thus the code was failing.
Some party more in this time maybe, between christmas and the new year ... you can understand i hope 🙂
By the way, the strange i will try understand, that maybe still result strange to me is: if the folder was on root, by the way it was created and shared, also if not escaped.
While the sequential subfolder not.
So i'll return over this, and let know in case, as well providing all the code, as the plugin will be released if i still have not detect how this was happening and reporting the reason.
In the while, Thank you Greg. Wish you a Nice 2017!
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!