Comments
-
I think the issue with your existing code is the "contentLength" header you're setting. Dropbox's CORS setup doesn't allow that header. It's also non-standard... I think you meant Content-Length , but I don't believe you'll be allowed to set that manually. Just pass the data you want to send and leave off this header. At…
-
I'm pretty sure that writeFile just does a call to /files_put . I think you want resumableUploadStep and resumableUploadFinish to do a chunked upload.
-
I'm going to try your code, but FYI, you can just supply an existing OAuth access token with dropbox.js by using this constructor: var client = new Dropbox.Client({ token: '<YOUR TOKEN HERE>' });
-
CORS is generally supported throughout the API. (There's even a JavaScript SDK: https://github.com/dropbox/dropbox-js.) Could you share your code?
-
Not with Dropbox directly, no. But this is the API Development forum, and a developer could build an app to do that using the API.
-
"m. chiuq", your post seems unrelated to this thread. Please start your own thread to ask a new question.
-
* Access tokens don't expire, but they can be invalidated by a user who revokes your app's access. To test an access token, just make an API call and handle the exception for a 401 response. I'm not sure what null value you're checking for, but nothing client-side will tell you if the access token is valid; you need to…
-
This is likely some kind of encoding error (e.g. not encoding the space or the parentheses right). Could you share your code? What platform are you on? Are you using an SDK?
-
Understood. We're tracking this as a feature request.
-
Libmagic guesses based on the file contents. We're unlikely to take that approach... you could do something similar by just downloading the first portion of the file (a hundred bytes?), since most of the file type markers that this kind of library look for are located in the header of the file. What's the specific scenario…
-
Yes, that's what Dropbox does. It's true that file extension doesn't guarantee file type. Can you think of something that does guarantee the file type?
-
To add a little color here, what Greg suggests is all that Dropbox does anyway. We don't store any sort of MIME type with the file; we just look at the file extension. So there's no advantage to getting this information from Dropbox; just pick your favorite list (e.g. from a web server) and map the extensions yourself.
-
If you're talking about a share link (http://www.dropbox.com/s/...), then yes, the address remains the same and always points to the latest version of the file.
-
I'd say give the recovery a bit more time. It's very likely that the error you're getting is related to this issue.
-
See https://status.dropbox.com/. I would wait until the status shows that Dropbox is fully working, and then try again.
-
Could you share the filename you're using?
-
Out of curiosity, in case it happens to someone else in the future, what was the issue with the string that came back from JsonConvert.SerializeObject?
-
FYI, I ran my version of the code (with var bodyContent = new { };), and it succeeds. If yours is still failing, we'll really need to see the response body.
-
What's the actual body of the error response, though? The HTTP response should contain a body with details.
-
BTW, this code is untested, but I think you can simplify to this: var webRequest = (HttpWebRequest)WebRequest.Create("https://api.dropbox.com/1/team/groups/list");webRequest.Method = "POST";webRequest.ContentType = "application/json";webRequest.Headers.Add("Authorization: Bearer <accesToken>"); using (var streamWriter =…
-
What's the content of the response from the server? There should be an error message explaining what the issue is. (Or perhaps you can share what's in bodyContent so we can guess as to the issue.)
-
The API doesn't impose any limits on the number of files uploaded per day or per account.
-
The limits are the same whether you make the HTTP requests yourself or use a library to do it.
-
See https://www.dropbox.com/developers/core/docs#chunked-upload. There's no limit on the size of file you can upload (except the size of the user's Dropbox), but an upload has to complete within 48 hours, so there's a practical limit based on how much data you can upload in that time.
-
No updates, sorry.
-
Yes, this is still under consideration.
-
Thanks for checking on this. Unfortunately, I don't have any update yet. It's still something under active consideration.
-
This is something we're actively considering adding.
-
Here's the documentation for https://www.dropbox.com/developers/core/docs#search, which should help you find all the right files. Then you can call https://www.dropbox.com/developers/core/docs#files-GET to fetch the contents of each file.
-
You're right that the app key is public information, and someone can use that together with the implicit flow to impersonate your app. If you're building a pure server-side app, you can disable the implicit flow to prevent this, but otherwise, this is simply how OAuth works. (This security model is not specific to…