Greg-DB Dropbox Community Moderator

Comments

  • @"jeji" I'll follow up on this thread once I have an update on this.
  • In this code, you're still putting the access token on the URL, but additionally with the string "Authorization". You should instead be sending this as a header. Based on the rest of your code, for your client that would probably look something like this: oHTTP:setRequestHeader("Authorization", "Bearer" + ctoken) Likewise,…
  • [ Cross-linking for reference: https://stackoverflow.com/questions/61251822/unknown-api-function-files-upload ] I've posted an answer on your StackOverflow question. Hope this helps! 
  • Yes, you can use this filesCopyBatchV2 method to copy files from multiple different locations into one folder. When doing so though, each 'to_path' shouldn't all be exactly the same. The 'to_path's can all be inside the same folder, but they should include the different file names so they don't conflict with each other.
  • It looks like you don't have a continuation "\" on the second to last line, like there is on the other lines, so the last line may not actually be given to curl which would result in no data being upload. Try adding that "\" back.
  • The app key is considered public and does not need to be protected. The app secret should ideally be kept private though. For server-side apps, such as web apps, this is possible since the app secret can be kept on the server only. In client-side apps, it's not possible to secure secrets unfortunately. Instead, you can…
  • Thanks for the report. It looks like we may be using a generic HTML error page in some rate limiting cases. We'll look into it.
  • I just tried this out myself in a test account for reference, and I don't think I'm seeing the same behavior. For example: curl -X POST https://api.dropboxapi.com/2/files/get_metadata \ --header "Authorization: Bearer <ACCESS_TOKEN>" \ --header "Dropbox-API-Select-User: <MEMBER_ID>" \ --header "Content-Type:…
  • This 'failure/relocation_error/to/conflict/folder' error indicates that the operation failed because there is already a folder at the destination path you specified. Note that when specifying a destination path like this, you should specify the full path where you want to put the item, including both the path of the parent…
  • Have you made any changes to the Java SDK project? If so, can you let me know what? Also, for reference, if you don't need to make changes we recommend that you don't build from source. If you don't need to make changes it's much easier to use one of the pre-built releases, e.g., via Maven or Gradle as documented here.
  • Yes, this is fine. Dropbox shared links don't break when editing the linked files, and I'm not aware of any plans to introduce a change like that. One note though, in general WriteMode.update is more recommended than the overwrite mode, as it's safer. Using overwrite can lead to your app overwriting new changes that it…
    in File Links Comment by Greg-DB April 2020
  • The "path" parameter you specify is the path in the Dropbox account where you want to put the uploaded file. If your app uses the "app folder" permission, that path will be used relative to the app folder. The "path/conflict/file" error indicates that there's already something at the specified path, so the upload couldn't…
  • I don't believe we have a full example of that, but it would look like this: client.files().listFolderBuilder(path).withRecursive(true).start();
  • You can use listFolderBuilder to get a ListFolderBuilder you can use and call withRecursive(true) to do a recursive listing if you wish. That would include nested items. Or, to just list the contents of particular nested folder when needed, you can use listFolder/listFolderContinue again with the path of the folder you…
  • Yes, using the Dropbox Java SDK, you can get the list of files/folders under any particular path using the listFolder/listFolderContinue methods. The result will contain a list of Metadata objects, from which you can get the paths for the referenced items. There's an example of calling listFolder here. As shown there, to…
  • @"aviennas" Thanks for the additional feedback!
  • No, unfortunately Dropbox doesn't offer a way to programmatically set Chooser/Saver domains like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 
  • We have an example of using upload sessions in the JavaScript SDK here: https://github.com/dropbox/dropbox-sdk-js/blob/b2353edeb221ec17b8e70a1d8fd4799e2f1f031d/examples/javascript/upload/index.html#L63
  • @"jlgarnier" The Dropbox API should only list files that are in the connected account. A few possibilities come to mind here: * You may be looking in the wrong location for these files. For example, the Joplin app uses the "app folder" permission, so it would be operating only in the special app folder made for it,…
  • That 'restricted_content' error indicates that the file has been flagged as restricted (e.g., for malware, DMCA, etc.). If you believe that the file has been incorrectly flagged, you can contact support to ask them to review it: https://www.dropbox.com/support
  • Can you confirm you followed all of the instructions for configuring your project and setting up the authorization flow as documented here? For example, make sure you have your "CFBundleURLSchemes" configured with your "db-APPKEYHERE" URL scheme, and that you have the code in place to handle the redirect. Also, do you get…
  • The /2/file_requests/get endpoint is for retrieving the information about a 'file request', not a file itself. (A "file request" is a way to receive files from other people.) To get the data for a particular file, you should instead call /2/files/download.
  • To create a shared link via the Dropbox API, you should use the /2/sharing/create_shared_link_with_settings endpoint: https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings That allows you to specify a file or folder and returns a shared link for it. You can then use…
  • The Dropbox API v2 JavaScript SDK does not offer a way to check the progress on a transfer unfortunately, e.g., for filesUpload. I'll pass this along as a feature request to the team but I can't promise if or when that might be implemented. If you're using "upload sessions" though, where you upload files in pieces, you can…
  • I see, thanks for the additional information. Unfortunately, I don't believe that's something we'd be able to support, as the 'dl=1' option is intentionally only configured for downloading, not playing in the browser as Safari is attempting to do.
  • Yes, that endpoint expects the full shared link, not the short version. By the way, it sounds like you're using the /2/sharing/create_shared_link endpoint to get that short URL. That endpoint is deprecated, so you should use the /2/sharing/create_shared_link_with_settings replacement instead. That doesn't offer the ability…
  • No, unfortunately the Dropbox API doesn't offer a way to get package information like this. I'll pass this along as a feature request for a better way to handle these, but I can't promise if or when that might be implemented. 
  • To retrieve the account ID, you should call the getCurrentAccount method. There's an example of doing so here. You can make that call wherever/whenever you need in your app, e.g., when you need to get the account ID when first storing the access token, etc.
  • That returns the user ID from the authorization flow. The user ID does identify the particular Dropbox account and is stable for the account, so you can technically use that. Preferably though, you should use Account.accountId as returned by getCurrentAccount. That also uniquely identifies the Dropbox account and is…
  • I see, thanks for clarifying. If you do want the download behavior, using "dl=1" is correct. I just tried this myself with a Dropbox shared link to a .mp3 file with "dl=1" in Safari on an iPhone running iOS 13.3.1 though, and upon accessing the link Safari prompts me to choose between "View" and "Download". Choosing…