-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Content-Length when #upload passed string #39
Comments
That's interesting, thanks for your report. I can't look into it with detail right now but will try to reproduce it this week. |
I'm a bit confused, I think you're passing the path to the local file rather than the file contents, as the method expects. This is documented here: http://www.xuuso.com/dropbox_api/DropboxApi/Client.html#upload-instance_method What's the value of If you pass the path to a file, this'll be saved in Dropbox as the content of your file. |
I'm sorry, I documented it incorrectly. I've updated the original post. |
I see now, thanks for your report! I'll release a new version including this fix as soon as I get a chance, over the next few days. |
I noticed that when the
#upload
method is given a string (like the result ofIO.read
), the uploaded file is not the correct size.I compared the content of the two files and they are identical up until test1's premature end (it is missing the last 269 bytes).
I traced the issue to here. I believe the first priority method to call should be
#bytesize
, which will get the proper size in bytes. I'd be happy to submit a PR if you agree.The text was updated successfully, but these errors were encountered: