question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to upload more than 10MB

See original GitHub issue

When using the example code for uploading videos to youtube using the api (https://developers.google.com/youtube/v3/docs/videos/insert) i’m getting the following error for all videos over 10MB:

The API returned an error:  Error: Request body larger than maxBodyLength limit
    at RedirectableRequest.write (C:\Users\Malte\Googl…w-redirects\ind…:66)
    at PassThrough.ondata (_stream_readable.js:642)
    at emitOne (events.js:125)
    at PassThrough.emit (events.js:221)
    at addChunk (_stream_readable.js:265)
    at readableAddChunk (_stream_readable.js:252)
    at PassThrough.Readable.push (_stream_readable.js:209)
    at PassThrough.Transform.push (_stream_transform.js:146)
    at PassThrough.afterTransform (_stream_transform.js:87)
    at PassThrough._transform (_stream_passthrough.js:42)

~I was able to fix this by editing https://github.com/olalonde/follow-redirects/blob/master/index.js#L226 of the follow-redirects module to something bigger as this is stopping all bigger requestbodys and therefor stop the uploading of most videos.~

Edit: A better way to fix this is to install Version 1.2.6 of follow-redirect as this is the newest version without this new “feature”.

See also this commit that implemented this restriction to follow-redirects https://github.com/olalonde/follow-redirects/commit/847a47fb00ea2dcb7a8886ca16d9d82dc6accb5d

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
simonplendcommented, Feb 22, 2018

Thank you @JustinBeckwith for fixing this by raising the default of maxContentLength in #1016 !

In the meantime for anyone else waiting for this fix to land in a release, the workaround that @condorman proposed above works a treat. Or if you’d prefer:

google.options({ maxContentLength: (100 * 1024 * 1024) });

2reactions
Lergincommented, Feb 14, 2018

Another way to prevent this issue from happening is to install Version 1.2.6 of follow-redirect as this is the newest version without this new “feature”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't upload files larger than 10 MB - Microsoft Community
I'm trying to upload 40MB, 50MB, 100MB and 250MB files (separately); however, I always receive an error stating "Ensurer was not managed across...
Read more >
Unable to upload file larger than 10MB? - java - Stack Overflow
When deployed in Jetty (Java 8) it works when the file size is approximately lower then 10MB, small files like 1-2 MB, when...
Read more >
Cant Upload more then 10mb file size - Nextcloud community
Below then 10mb is fine. Is this the first time you've seen this error? (Y/N): Y. Steps to replicate it: upload file more...
Read more >
Can't upload file larger more than 10MB - Discourse Meta
i tried upload .json file(12.MB) in my site, but i can see this message: Sorry, that file is too big (maximum size is...
Read more >
IZ47683: FILE UPLOAD GREATER THAN 10MB - IBM
The problem can be reproduced by the following steps: 1. Create a spb file with the Software Package Editor using Java Web Start...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found