Greg-DB Dropbox Community Moderator

Comments

  • Apologies for the confusion! The SDK doesn't offer an implementation of RespondPageWithJSRedirect. That's intended to be whatever page you wish to show to the user at that point in the process. (E.g., it can optionally contain a message for the user, and whatever branding/styling you want for your app.) Here's where this…
  • I'm glad to hear you already sorted out the original issue. To control overwriting, you should use this version of the uploadUrl method, which takes a 'mode' parameter. The 'mode' parameter accepts a DBFILESWriteMode object, which you can set to your desired write mode, such as "Overwrite". There's an example of that here.
  • The Dropbox API and documentation are designed with programmers in mind, so if you don't have any programming experience, it may not be very approachable. You may be better suited by looking for a pre-made plugin for your platform. I can't recommend or endorse any in particular though. If you are interested in working with…
  • Dropbox doesn't offer a general app listing like that where users can browse API apps, but I'll pass this along as a feature request. There isn't a way to look up the owner's account information based on an app name. In cases like this though, it's usually just a colleage that registered the name, so I recommend checking…
  • If you're using .NET, we highly recommend using the official Dropbox .NET SDK. There's an example app that shows both uploading and downloading here.
  • Thanks for the feedback! By the way, I should also mention the /2/files/get_temporary_upload_link functionality. That would still require you to use your own server to make the API call itself, as it requires an access token, but it would at least enable the client to then upload directly to Dropbox without sending the…
  • If you're working in C#, we recommend using the official Dropbox .NET SDK, if you can. There's an example of using that to create a folder here. Typically, you would implement the OAuth app authorization flow to allow any abitrary user to connect their own account, but if you are only running this yourself and only need to…
  • The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security…
  • Thanks! I just tried this, and the network requests to the Dropbox links aren't running particularly slowly for me. How are you measuring this? What step exactly is running slow? I do notice that you have `result` scoped outside any particular function, and you're doing `result+= xhr.responseText`, meaning that each call…
  • @"erik-121" My comment here was only to link to your other posts, where someone has already answered your question, in case anyone else came across this thread with the same question. Please refer to your other posts for more information, including a link to a sample that shows how to use a download-style method like this.…
  • It should show up automatically when you're typing code. If you don't have it enabled, you can enable it under 'Preferences > Text Editing > Code completion'.
  • The method definition for uploadData has changed slightly since the old version you were using. You can find the current definitions here, but I recommend using Xcode's autocomplete to fill it for you.
  • I see, thanks for sharing the output. This error isn't actually reporting an issue with the remote path (indeed "/backups/mydatabase.sqlite" looks correct) but rather with the local path for the downloaded file. What version number of the SDK do you have installed? There were some bugs like this previously, but they should…
  • It sounds like the different strings you're trying to use have different normalization forms, and so they aren't equivalent. You should probably normalize them before comparing them, such as covered here for Node.js. Hope this helps! 
  • [Cross-linking for reference: https://github.com/dropbox/dropbox-sdk-js/issues/229 / https://stackoverflow.com/questions/53801974/download-file-with-dropbox-api-js ]
  • I'm not aware of any reason that using XMLHttpRequest in particular should be very slow. Can you share the code you're using and how you're measuring this?
  • I'm glad to hear you have this working now. For reference though, note that the files uploaded via the Dropbox API should be available on the Dropbox API/web site as soon as the upload API call returns. If you weren't seeing the file immediately on the Dropbox web site or a mobile client, it's possible you just needed to…
  • [Cross-linking for reference: https://stackoverflow.com/questions/53815606/objective-c-dropbox-sdk-v2-downloading-file-not-found ] When referencing files by path using the Dropbox API, the path should be relative to whatever root your app has. For instance, if your app is registered for the "app folder" permission, its…
  • Thanks! I'll work on getting that environment working to try to reproduce this. (I can't make any promises though, as we don't officially support Cordova/Ionic.) I'm looking through the code though, and I don't see where you actually construct the Dropbox JavaScript client object and call usersGetCurrentAccount, per your…
  • If the file is a PDF to begin with, you can use filesDownload to retrieve the original file data. Exactly what you do with the data is up to you. Downloading to the local filesystem is not required. You may want to pass the file data to some PDF viewer, for instance. 
  • Thanks! I see you're referencing a Dropbox web site URL in your path. When identifying files by path on the Dropbox API, you should not use Dropbox web site URLs like this. You only need to write them relative to "root", so e.g., you might use a value like "/Pi Image Search/123.jpg", to upload a file into a folder named…
  • Thanks, I am referring to that 'path' variable you're passing in to files_upload. Can you share the actual value in 'path' after that 'format' call? I.e., "print(path)" just before you call files_upload.
  • Thanks! I see you're getting a 'malformed_path' error. That should indicate that the path you're giving for the upload isn't in a valid format. What value are you supplying as the 'path' parameter (i.e., the second parameter on files_upload)?
  • Nothing in the code you've provided so far looks problematic. Unfortunately Cordova isn't officially supported by Dropbox though, so I'm afraid I don't have experience using it. Can you share a complete sample including all of the code necessary so we can reproduce this?
  • It looks like the output you shared here is cut off. There should be more after "UploadWriteFailed". Can you share the rest of that so we can take a look? Thanks in advance! 
  • No, the Dropbox API only supports the code and implicit grants.
  • That occurs automatically as part of the new Dropbox extensions flow (which is distinct from the public Dropbox API).
  • It looks like you're referring to the notifications that occur as part of the flows from the new Dropbox extensions. This isn't something you can configure for uploaded files in general.
  • Regardless of how your client/server is set up, the end-user will need to be sent through the Dropbox OAuth app authorization flow to authorize the app to access their account. This only needs to be done once per user. Once you have the access token for that user, you supply it in the "Authorization" header as "Bearer…
  • Thanks. That does look valid. I also just tried it in the JavaScript SDK using your code and it worked as expected for me. (It failed with a 401 Unauthorized; the malformed check occurs first, so it would fail with the malformed error even if the token is revoked.) Just to check, can you make sure you're not actually…