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
UploadError: Missing end boundary in multipart body. #167
Comments
Sorry you are unable to use this gem. At this point it is probably best you use a different youtube gem @scaryguy. Since I'm unable to reproduce this I'm closing this issue. Please provide a failing test or a patch for us to look at. |
Hi @kylejginavan, I just experience the same error as @scaryguy, same kind of simple test based on the readme file. Using Ruby: 1.9.3p327 I would really appreciate if you can have a quick look, I don't know what I'm missing or doing wrong. |
I also encountered this error. Using: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux] I was attempting to upload a .avi file using the code in the readme. |
Just tried with a .mov file and also got the error. It's strange because last night it worked fine... |
I investigated the issue. In my opinion problem is in the fact, that Faraday::Excon adapter tries to read body without passing buffer size (probably it assumes that body will be returned as a whole) # TODO: support streaming requests
def read_body(env)
env[:body].respond_to?(:read) ? env[:body].read : env[:body]
end This goes to GreedyChainIO which assumes that default buffer size is 500k class YouTubeIt::GreedyChainIO < DelegateClass(YouTubeIt::ChainIO)
BIG_CHUNK = 512 * 1024 # 500 kb
def read(any_buffer_size = nil)
__getobj__.read(BIG_CHUNK)
end so it does not return more than 500k as a body to faraday (and body is cut in the half). I made some tests - I tried to upload 600k video file to youtube and got topic error. Then I increased buffer size in GreedyChainIO to 1MB and upload was performed without any problems However I have no idea how to fix this.... |
@chrosciu well said and thank you. I will research this a bit more. |
@kylejginavan: I prepared some fix both for this issue and #159. If you think it is ok, I can prepare pull request |
Thanks @kylejginavan, I'll give it a test right away! |
I just tested the fix @kylejginavan and it worked perfectly! |
@facetoe : glad to hear it :) |
@chrosciu thanks! I going to put your fix! |
@ALL today we going to make the new realease with the fix! |
When I use standart upload method just the same as it exists in READ ME, I get this error:
P.S: I had told you, chebyte, that my boss would make a small donation last day. I'm sorry but I can't force my boss to make a donation for something which we can not even use. I couldn't use the gem since I met it.
The text was updated successfully, but these errors were encountered: