How to handle errors for videos that are bigger than max file size? #231
Closed
josipRajkovicFlowout
started this conversation in
General
Replies: 1 comment 2 replies
-
Hey, thanks for a good explanation :) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
first of all thank you for the great package, really appreciate the work you've put in.
I have a question regarding the
->maxFileSize("1m")
option.If I use it in my implementation it does work in a sense that it doesn't download a video to my tmp folder, but it fails in the next step as there is no reported error (
if ($video->getError() !== null) {
doesn't equal to true as there is no error I've checked the originally generated metadata json).On the next step I get an error 500 on
$fileInfo = $video->getFile();
line in the else condition (YoutubeDl\Entity\Video::getFile(): Return value must be of type SplFileInfo, null returned
is the exact error).My implementation:
How can I properly handle an error where the video is too big so I can notify a user too?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions