Skip to content
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 error not handled #17

Closed
nerg4l opened this issue Jun 29, 2017 · 6 comments
Closed

Upload error not handled #17

nerg4l opened this issue Jun 29, 2017 · 6 comments

Comments

@nerg4l
Copy link

nerg4l commented Jun 29, 2017

Hi!

This almost made me insane. It took me two hours of debugging on a test server.
When an upload error occurs the code gives "Failed to open input stream" error message, because the first time this cause a problem in the code is at ChunkSave:191, because the path name of the uploaded file is empty.
I think the constructor of FileReceiver should handle upload errors but this more of a feature request than a bug.

@pionl
Copy link
Owner

pionl commented Jul 3, 2017

HI @nerg4l, sad to hear that,

could you share me your code how you init the FileReceiver? Thank you

@nerg4l
Copy link
Author

nerg4l commented Jul 3, 2017

I use the most basic initialization.

$fileReceiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request));

My problem was that the post_max_size in php.ini was set to 2M and the chunk size was 5MB so the upload failed with error code 1 which is UPLOAD_ERR_INI_SIZE. However the Failed to open input stream error message mislead me.

@pionl
Copy link
Owner

pionl commented Jul 3, 2017

Thank you. I'm sorry for this error, I thought that larvel will raise exception on error.

I've updated code to raise exception when there is an error. Is it ok for you now?

Have a great day,

@nerg4l
Copy link
Author

nerg4l commented Jul 3, 2017

Absolutely. Thank you for the great work.

@pionl pionl closed this as completed Jul 3, 2017
@maulik0007
Copy link

i am getting this error on shared hosting with chunk upload using dropzone, its working fine in local but not working in live site.

Note: in local i can upload video of 90M but in live server i can upload video of 3M and when try to upload video of 90M it gives below error.

exception
:
"Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException"
file
:
"/home/project/vendor/symfony/http-foundation/File/File.php"
line
:
36
message
:
"The file "/home/project/storage/app/chunks/./videoplayback.mp4-bBG5AJcXMpoAlJEt7GgaGkGAz1JEQcixbZ3FCoOn.part" does not exist"

@pionl
Copy link
Owner

pionl commented Feb 1, 2023

Hi @maulik0007 please check you storage config. In attached file path you can see a '.'. This is invalid path.

chunks**/./**vid

Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants