0

enter image description here I use Dropbox folder by setup Dropbox program in my computer When I have to get direct link to any file in Dropbox folder just I go to Dropbox folder in my computer and choose that file and right click by mouse and select copy direct link of that file

How I do that by vb.net I want to brows for file and select it and get that direct link by vb.net

And I am sorry for my bad English

1
  • it's impossible ?
    – Sedo
    Commented May 19, 2019 at 9:52

1 Answer 1

0

[Cross-linking for reference: https://www.dropboxforum.com/t5/Discuss-Developer-API/How-do-I-get-the-share-url-of-a-local-dropbox-file-using-vb-net/m-p/345339 ]

The kind of Dropbox link you're referring to isn't a "direct" link, but rather a "shared" link, where the link itself points to an HTML preview page, where the user can download the file if they want. You can find information on this feature here:

https://help.dropbox.com/files-folders/view-only-access

Dropbox does offer an API you can use for listing, uploading, downloading, and sharing files, among other operations. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here:

https://www.dropbox.com/developers

Dropbox does offer a .NET SDK in particular:

https://github.com/dropbox/dropbox-sdk-dotnet

To create a shared link for a file or folder using the .NET SDK, you would use the CreateSharedLinkWithSettingsAsync method:

https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Sharing_Routes_SharingUserRoutes_CreateSharedLinkWithSettingsAsync_1.htm

8
  • Hello My friends i use tht function CreateSharedLinkAsync but i have error
    – Sedo
    Commented May 21, 2019 at 22:17
  • Me.TextBox2.Text = CreateSharedLinkAsync(NewPicturePath.Text, False, Nothing)
    – Sedo
    Commented May 21, 2019 at 22:18
  • The CreateSharedLinkAsync method gives you a PathLinkMetadata, not a String, but you're attempting to use it as a String. By the way, I accidentally linked to the deprecated version of this method. You should actually use CreateSharedLinkWithSettingsAsync. I fixed it in my answer. That returns a SharedLinkMetadata. You can get the shared link from SharedLinkMetadata.Url.
    – Greg
    Commented May 22, 2019 at 2:02
  • my dear friend, I am so sorry look to that error 6.top4top.net/p_1237rbllw1.png how i do it
    – Sedo
    Commented May 22, 2019 at 10:47
  • It looks like you're stuck on supplying the settings parameter. That parameter is actually optional, so you can skip it if you don't need to set any non-default settings. I believe you'd need to use named parameters to do that, like CreateSharedLinkWithSettingsAsync(path:Me.NewPicturePath.Text). (Otherwise, the settings parameter should be an instance of SharedLinkSettings.)
    – Greg
    Commented May 22, 2019 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.