Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
solsupp
7 years agoExplorer | Level 3
Folders
I am surrently using:
Private Shared Sub FileUploadToDropbox(ByVal filePath As String, ByVal fileName As String, ByVal fileSource As String) Dim dbx = New DropboxClient("<REDACTED>") ...
solsupp
7 years agoExplorer | Level 3
Dim myMembers = New AddMember(New MemberSelector.Email("EMAILADDERESS"), Nothing)
dbx.Sharing.AddFolderMemberAsync((filePath + ("/" + fileName)), myMembers, False, "Docs UPloaded")
Seem to get an error, not sure what to do here:
Error BC30512 Option Strict On disallows implicit conversions from 'AddMember' to 'IEnumerable(Of AddMember)'.
Even casting to 'IEnumerable(Of AddMember)' causes error
Can you help
Greg-DB
Dropbox Community Moderator
7 years agoThe 'members' parameter does require a IEnumerable<AddMember>, but it appears you're only supplying a AddMember, not in an IEnumerable.
I'm not a Visual Basic expert, but I believe you can build it like this:
Dim myMembers() as AddMember = {New AddMember(New MemberSelector.Email(emailAddress), Nothing)}
- solsupp7 years agoExplorer | Level 3
Thanks for that, apologies, I am a newby here, 1 more question, how do I get a folderID, can I quierie it based on folder name?
- Greg-DB7 years ago
Dropbox Community Moderator
You can get the shared folder ID from SharedFolderMetadata.SharedFolderId (e.g., from a completed ShareFolder job, or elsewhere, such as from ListFolders/ListFoldersContinue) or from FolderSharingInfo.SharedFolderId in FolderMetadata.SharingInfo (e.g., from ListFolder/ListFolderContinue or GetMetadata).
- solsupp7 years agoExplorer | Level 3
Are there any examples in the API, have googled this, but not sure how to apply this to code.
Just want FolderID based on folder name if possible.
Dim link = dbx.Sharing.GetFolderMetadataAsync((filePath + ("/" + fileName))) Dim myMembers() As AddMember = {New AddMember(New MemberSelector.Email("EMAILADDRESS"), Nothing)} dbx.Sharing.AddFolderMemberAsync(link.Id.ToString, myMembers, False, "Docs Uploaded")Get error:
System.ArgumentOutOfRangeException: Value should match pattern '\A(?:[-_0-9a-zA-Z:]+)\z'
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!