Greg-DB Dropbox Community Moderator

Comments

  • Can you clarify what you mean when you say "it won't work"? What error/output do you get? You should be able to use this method to upload to an existing file by specifying the file ID, even if it's in a shared folder, for instance, as long as the file is in the connected account and the account has write access.
  • 1.- can we the files with certain prefix using the api? I'm not sure I understand this question. I think you may have accidentally left out a word or two in this sentence. Can you clarify? Thanks. 2.- can we use the url of those files we get using the api in our websites? (like background images, icons, etc) in other words…
  • Can you share the code you're using to call sharing_list_shared_links so we can see what parameter(s) you're setting? Also, what kind of shared link are you expecting/using? Could you maybe share an example for reference? You can also open an API ticket here if you'd prefer to share privately. Thanks!
  • Thanks! I just tried this out but I don't see the "ERR_INVALID_HANDLE" error you mentioned, when attempting to upload a file larger than 150 MB. What browser/version are you using? I do notice that you don't seem to be sending the session ID up properly on the /append_v2 calls. The parameters being sent look like:…
  • There are bandwidth limits on shared links like this. You can find information on that in the help center here. If you just need to download files from your account though, you can do so without shared links. For instance, you can use the /2/files/download endpoint, which returns the data directly and isn't subject to the…
  • While not considered a "REST" API in particular, Dropbox does offer an API you can use for listing, uploading, and downloading files, among other operations. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here. We recommend using one of the official SDKs,…
  • I'm not sure off hand what that error would indicate. (It's not an error from the Dropbox API itself.) Do you have a live sample page where I can plug in my own access token and test this out so I can take a look?
  • In this code, you are also attempting to upload to a shared link. Shared links do not support uploads like this. This method expects the path where you want to upload the file in the connected account. The error message is indicating that the path you're supplying is not in the expected format (since it is a shared link,…
  • We've updated the Embedder implementation to better handle these cases and improve the error reporting when needed. Unfortunately, due to some of the new cross-site behaviors in some modern browsers we can't always display the content directly (depending on the user's browsers settings and behaviors), but the Embedder…
  • @"TobiasR" @"pcuadros" @"thefreshlab" We've updated the Embedder implementation to better handle these cases and improve the error reporting when needed. Unfortunately, due to some of the new cross-site behaviors in some modern browsers we can't always display the content directly (depending on the user's browsers settings…
  • We've updated the Embedder implementation to better handle these cases and improve the error reporting when needed. Unfortunately, due to some of the new cross-site behaviors in some modern browsers we can't always display the content directly (depending on the user's browsers settings and behaviors), but the Embedder…
  • We've updated the Embedder implementation to better handle these cases and improve the error reporting when needed. Unfortunately, due to some of the new cross-site behaviors in some modern browsers we can't always display the content directly (depending on the user's browsers settings and behaviors), but the Embedder…
  • Thanks! It looks like the issue here is that when you click "Share File", that causes the page itself to reload (since you're submitting a form), which interrupts the Dropbox API call. You should update or restructure your page to avoid that reload. That's not really related to the Dropbox API itself, but it looks like…
  • @"mrivera" The API v2 Python and JavaScript SDKs are different code bases and may offer different features like this. I can't offer insight on why one may have something like this implemented and the other doesn't, but I've sent this along as a feature request.
  • From your script tag, you're using the latest version, which should work. (Though for reference, in a production app we recommend you import a specific version, since the SDK may occasionally receive major updates with breaking changes.) I can't seem to reproduce the "undefined" issue you're seeing though. Would you be…
  • When you upload data to Dropbox via the API, you should upload the actual file data, without any encoding (such as base64 encoding). Dropbox does not apply any decoding on the uploaded file data; it will just commit what you send. Try uploading the data without the base64 encoding. 
  • [Cross-linking for reference: https://stackoverflow.com/questions/66862389/image-upload-to-dropbox-api-from-ios-sends-corrupted-file-to-dropbox ] The /2/files/upload endpoint is a "content-upload" style endpoint, meaning that it requires the file data to be uploaded in the request body. I see you're attempting to set the…
  • Thanks! That's helpful. From this output, I see you are getting an API error (with a 409 status code). You can print out the API error object like to see the endpoint-specific error: .catch(function(error) { console.log(error.error); });
  • @"eweb" I tried this out, and it's working successfully for me. Even after the initial short-lived access token expires, the SDK automatically uses the stored refresh token to get a new short-lived access token and then uses that to successfully make further API calls, without having to report 'expired_access_token' back…
  • Dropbox doesn't currently offer a way to embed a file request like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
  • @"eweb" Thanks! Looking at the comparison, I see the relevant difference is the replacement of authorizeFromController with authorizeFromControllerV2 in linkDropboxButtonPressed. That looks correct, and I don't believe you're missing anything. I'll give that a try myself and look into it. 
  • @"JpMaxMan" I don't have any news to share on this request unfortunately.
  • Thanks! It looks like your understanding is correct. I'm bringing this up with the team to see if we can update the SDK to not retry on an auth failure like that.
  • @"eweb" I'll ask the team to update the DBRoulette example. I can't promise exactly when that would be done though, so in the meantime perhaps you can share what you have so far and I can take a look at see what the issue might be.
  • This code looks correct and works for me. I'll be happy to help with this however possible, but I could use some more information: * Is that the full error output you receive? Please share any other output. * What version of the SDK are you using? * How are you importing the SDK? * What environment are you running this in?…
  • @"kevin g.1" Thanks for the note! I'll pass this along as a feature request but I can't promise if or when that might be implemented. 
  • To make sure I know exactly what functionality and issue you're referring to, can you share the relevant code you're running, and the unexpected error/output? Thanks in advance! 
  • Thanks for following up. No, unfortunately I don't believe there's a way to close that page. I'll send this along to the team to see if we can improve this in the future, but I can't make any promises.
  • The startOAuth2PKCE method will automatically use short-lived access tokens and refresh tokens for you. You can find an example of using that method here. When using that, you should save the "credential" (which contains both the access token and refresh token) instead of just the access token. You can see an example of…
  • @"marcoalt" I see you've also opened a new thread for this, so I'll follow up with you there.