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
upload_file fails with files larger than ~2.15 GB #257
Comments
@jeroenooms this is probably a curl issue? |
It may well be an issue with the curl package. I can post an issue there, if you'd like. My system curl handles the file just fine, so it might be a problem specific to the R library. |
Hum. |
@jeroenooms Hah, yes it does. |
This seems to work fine: h <- new_handle(verbose = T)
handle_setform(h, description = form_file("~/Desktop/3gb.bin"))
req <- curl_fetch_memory("http://httpbin.org/post", handle = h)
|
Ok, let me see if I can reproduce the bug. |
It does not happen when we use multipart: POST(
url = url_string,
body = list(test = upload_file(short_file)),
verbose()
) It only happens when upload_file is directly used as the payload. |
Ahah! So that's what I've been doing (The api I'm working with requires it). |
I have a suspicion. When posting raw data httr sets the |
I pushed a fix to keep numbers as doubles and then cast them to
We should make sure this does not introduce any side effects though. |
I'll check. Thanks! |
Actually I'm reverting the curl fix, it should be done in httr by setting |
@zachmayer can you confirm that the problems have been resolved with the latest versions? library(devtools)
install_github("jeroenooms/curl")
install_github("hadley/httr") |
That works. Thank you. When do you think this change will be on CRAN? |
The bigquery breaking bug is a bit of pain, so a new release is moderately high priority, but I'm doing a lot of travel in the next few weeks, so I wouldn't expect anything before July 20 |
New curl is on cran now. |
I have a largish file (~4.9GB) I am trying to upload with POST. I can upload the first few lines no problem with:
Which yields:
However, the larger version of the file fails to upload:
Which yields:
The verbose output from the upload is:
And my
sessionInfo()
is:Content-Length: -2147483648
looks a lot like an integer overflow. I strongly suspect this function will always fail with files over ~2.2 GB, but haven't tested other cases.The text was updated successfully, but these errors were encountered: