One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
axew3
9 years agoCollaborator | Level 8
Behavior: create_folder do not share a subfolder, if path_lower contain chars like ' . And happy NY!
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]
- Apologies, this is still hard to follow without seeing the actual API call code, that is, seeing what API endpoints you're calling, and seeing the output you're getting, along with an explanation of the output you're expecting to get.
For example, are you only calling the /files/create_folder endpoint? That endpoint only creates folders. It doesn't share them automatically.
If you'd rather not post publicly, you can open a ticket here:
https://www.dropbox.com/developers/contact
Please include:
- the name of the API app
- the full text of the output/behavior you are getting
- the output/behavior you expect to get
- the relevant code
- Greg-DB
Dropbox Staff
I'm not sure I follow. Can you share the code and output showing this? Thanks in advance!- axew3Collaborator | Level 8
$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?
- axew3Collaborator | Level 8p.s is possible in case to patch this, informing user that the parent ROOT folder contain chars that not allow to create after inside him, another folder and have it shared immediately. Little strange but easy to achieve. Just thinking on how to patch in case this in the while. And will change it when resolved, if it is to be resolved in case.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 20 hours ago
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 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!