joedawson / youtube

Upload a video to a single YouTube channel with Laravel 5.
MIT License
175 stars 105 forks source link

1MB chunk hardcoded should be moved to config #120

Closed magojr closed 1 year ago

magojr commented 4 years ago

Hello, I'm using the library for a project for a Ski Team: coaches will upload videos of athletes using the site and it upload them to youtube. I'm developing it and checking functionality uploading about 20/25 video of 125MB average. It stop to works giving (in the Laravel log) a quota reached exception (10.000 daily). I was figuring out that a video has a weight of 1 but going into the code I discovered that video is uploaded by chunk of 1 MB. I already asked to google to increase quota, the're auditing my app...

Anyway I think that bring that parameter to the config may be very easy and helpfull for anyone using the library, to avoid the limit reaching. I figured out that the only place to change are these (switching "1" with a parameter from the config): https://github.com/joedawson/youtube/blob/master/src/Youtube.php#L93 https://github.com/joedawson/youtube/blob/master/src/Youtube.php#L190

Better implementation may use also the "-1" for upload the whole video but it will break the fread line, so it may be easily workarounded using a big dimension like 1000 in the config.

Thank You, Luca

joedawson commented 4 years ago

I agree that this would be useful to be as part of the config, I will look into adding this as part of the next major release.