Open pvagare opened 7 years ago
**Accessing a Share
Assuming you have the url that points to the Share API resource (ex. https://subdomain.sharefile.com/sf/v3/Shares(s0123456789)), you can easily access the Items shared. Depending on the share you may be required to already be authenticated.
var shareUri = new Uri("https://subdomain.sharefile.com/sf/v3/Shares(s0123456789)"); var share = await sfClient.Shares.Get(shareUri); var shareItems = await sfClient.Shares.GetItems(shareUri, share.AliasID); Items associated with a Share cannot be downloaded as you normally might, instead you need to use the Shares API to download.
// assuming you already have shareItems as noted before
var fileStream = await sfClient.Shares.Download(shareUri, share.AliasID, shareItems.Select(x => x.Id).First());**
**I also tried above but giving not able to download the file.
Please give me exact code for downloading the shared files**.
Hi @pvagare , sorry for the delay I've been on holiday.
What error do you receive when using the documentation sample?
In the code you provided (first comment), one issue I see is you're attempting to expand Children
when you'd need to expand Items
.
I did the following code to download the Shared folder files. Please verify the code and let me know if I am missing something, Please give me exact code for downloading the shared folder files.
Public Async Function Run(user As FileShareDefaultUser, clientId As String, clientSecret As String) As Task
Thanks !