Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
JagsDew
6 years agoExplorer | Level 3
Problem of uploading image to dropbox shared link using url
I am trying to upload the image to the dropbox shared link using the URL but I did not get the path of this shared link. I'm using the below code to get the metadata of the shared folder link but I ...
Greg-DB
Dropbox Community Moderator
6 years agoThe SharingFileLinkMetadata.path_lower (as returned by sharingGetSharedLinkMetadata) is "only be present only if the linked file is in the authenticated user's dropbox.". So, it sounds like the linked file doesn't exist in the account that you're connected to.
In that case, you'd need to supply the path yourself. For instance, perhaps you would want to build one using the returned file name in SharingFileLinkMetadata.name if you want it to have the same name as the linked file.
JagsDew
6 years agoExplorer | Level 3
Thank You for your response. But the user account that I used is an authenticated user dropbox account.
Do you think should I be doing something else to get path_lower from the shared link url?
- Greg-DB6 years ago
Dropbox Community Moderator
When you say "the user account that I used is an authenticated user dropbox account.", that doesn't necessarily meet the requirement.
In order to receive the path_lower value, the account for the access token you're using to make the call needs to be the same account as the one that created the shared link.
- JagsDew6 years agoExplorer | Level 3
As you told me, the account for the access token which I am using to make the call is the same account as the one that created the shared link.
Is there any other way to upload images to shared link programmatically?
- Greg-DB6 years ago
Dropbox Community Moderator
How are you checking that you're using an access token for the same account as the one that made the shared link? I just tried this functionality and it is working for me. When using the same account, I get the path_lower value. You can use the usersGetCurrentAccount method to check what account a particular access token is for.
Using the filesUpload method is a valid way to upload over an existing file in the connected account. You don't need to get the path_lower value from sharingGetSharedLinkMetadata in particular though. You can get the path from wherever you want, e.g., elsewhere on the API, such as from filesListFolder/filesListFolderContinue, etc., or you can even retrieve it from some previous storage in your app, or just hard-code it if it's always the same.
In any case, if something isn't working as expected, please share more details so we can look into it. You can also open an API ticket here if you'd prefer to share privately.
About Discuss Dropbox Developer & API
Make connections with 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!