I've been working with this for hours, I have .png files inside Dropbox and I need to get a raw link to those files so I can use it within my code. How can I retrieve in C# a shared link that I have in Dropbox? I need to retrieve that link so I can use it in my view to assign it to a src parameter for an image. Inside my controller I'm using the CreateSharedLinkWithSettingsArg method which creates shared links for files, but how can I get those links after? This is my code:
List<Dropbox.Api.Files.Metadata> list = new List<Dropbox.Api.Files.Metadata>();
foreach (var item in list)
{
var path = new Dropbox.Api.Sharing.CreateSharedLinkWithSettingsArg(item.PathDisplay);
}
I've used something like this and works good but this code throws an exception when the shared link already exists because the following code tries to create a shared link always, I've shared all the files and I just need to get the shared link within my code, how can I do this?:
var sharing = await client.Sharing.CreateSharedLinkWithSettingsAsync(path);
var src = sharing.Url;
I'm using Dropbox.Api v 2.0 and C#
GetSharedLinkFileAsyncnow