Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
solsupp
8 years agoExplorer | Level 3
Large Data Upload
Now have large data upload working, only 1 thing I cant do is share the folder. Errors on bold text, how do I get the parent shared folder ID after upload. Private Async Function ChunkUpload(path ...
Greg-DB
Dropbox Community Moderator
8 years agoWhat do you mean when you say it "seems to be this line that returns the NULL"? The UploadSessionFinishAsync method either returns Task<FileMetadata>, or raises an exception. Please add extra logging or use a debugger to confirm what is actually being returned or raised.
Anyway, UploadSessionFinishAsync is the correct way to commit and then receive the metadata for a large file upload.
Please note that SharingInfo is not guaranteed to be set. It is only set if the file is in a shared folder. You should check metadata.SharingInfo before trying to use metadata.SharingInfo.ParentSharedFolderId. More logging or a debugger would likely be helpful here as well.
Different files can be located in different folders, so it's possible one happens to be in a shared folder, and one isn't.
If you uploaded the file to a folder that is not yet shared, you can share ithe folder using ShareFolderAsync first.
solsupp
8 years agoExplorer | Level 3
Have also tried that which works, just cant get parentshartedfolderID from this task.
Dim updated As Task(Of ShareFolderLaunch)
updated = dbx.Sharing.ShareFolderAsync(filePath, Nothing, True)Once the folder is shared, I just want to add folder members.
- Greg-DB8 years ago
Dropbox Community Moderator
In this latest snippet of code, I see you're using ShareFolderAsync. Since that call is to share a folder itself, it doesn't have ParentSharedFolderId like files in shared folders do.
ShareFolderAsync returns Task<ShareFolderLaunch>. You should use CheckShareJobStatusAsync to check the status after calling ShareFolderAsync. CheckShareJobStatusAsync returns Task<ShareFolderJobStatus>. If ShareFolderJobStatus.IsComplete, you can use ShareFolderJobStatus.AsComplete to get the SharedFolderMetadata.SharedFolderId.
- solsupp8 years agoExplorer | Level 3
OK, getting a bit further now, what if I already have a shared folder that exists, I get the exception "bad_path/already_shared", can I check if a folder share already exists?
- Greg-DB8 years ago
Dropbox Community Moderator
Making the call and catching that exception is fine, but if you want to check beforehand, you can call FilesUserRoutes.GetMetadataAsync for the folder itself and check the returned FolderMetadata.SharingInfo. (Or, you can list all of the shared folders on the account using SharingUserRoutes.ListFoldersAsync/SharingUserRoutes.ListFoldersContinueAsync.)
About Dropbox API Support & Feedback
Find help with the Dropbox API from 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!