We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
emarco
6 years agoExplorer | Level 3
Problem with paths using create_shared_link_with_settings
Hey, I'm trying to make a php code that will automatically create a shared link for the files I'm uploading and add it to an XML file. Both the upload and XML file are updating correctly, but I'm s...
- 6 years ago
[Cross-linking for reference: https://stackoverflow.com/questions/53499573/problem-with-paths-using-create-shared-link-with-settings ]
Getting a shared link for the root is not supported, so supplying a path like "" or "/" is expected to fail like that.
To get the shared link for a file, you should supply the full path to the file, including the file name and extension. For example, for a file "example.xml" in a folder "Documents", the path would be: "/Documents/example.xml".
You can construct these paths manually if you want, but it's better to use the paths returned by the API itself. For instance, when uploading a file, the API returns the metadata for the uploaded file in the response body. Specifically, you should use the returned 'path_lower' value.
Greg-DB
Dropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/53499573/problem-with-paths-using-create-shared-link-with-settings ]
Getting a shared link for the root is not supported, so supplying a path like "" or "/" is expected to fail like that.
To get the shared link for a file, you should supply the full path to the file, including the file name and extension. For example, for a file "example.xml" in a folder "Documents", the path would be: "/Documents/example.xml".
You can construct these paths manually if you want, but it's better to use the paths returned by the API itself. For instance, when uploading a file, the API returns the metadata for the uploaded file in the response body. Specifically, you should use the returned 'path_lower' value.
emarco
6 years agoExplorer | Level 3
Hey Greg,
Thanks for the input, will give it a try and get back with the results!
- emarco6 years agoExplorer | Level 3
Okay, so after testing what you told me, I managed to make it "work".
The problem I am having now, is that I append the result into a text node, and when clicking that, I get redirected to something like:
Whilst, obviously, I just want the download link which is in the first line, in this case it being:
https:/www.dropbox.com/s/3qy4rbv5n5nlabcm/example.xml
Have deleted the file since it was an example, but the link was working previously.
Any idea how to just get the link back?
Really appreciating your help Greg
- emarco6 years agoExplorer | Level 3
Managed to do that with a string filter function! Thanks a lot for your help Greg :)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 6 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!