Cypress + Laravel - file upload testing works with a PNG but not with an MP4 file #25952
Unanswered
Jamesking56
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi hoping I can get some help here.
I'm using Cypress 10 with Laravel 9 + InertiaJS.
I have a hidden
<input type="file" name="some-name">
and when a file is selected, it is immediately sent using Axios to a Laravel route where the file is saved to storage. This form works for the necessary file types (images and videos) when I manually test but I'm having issues getting Cypress to upload files properly.My test does what the documentation says and uploads a file as follows:
Laravel successfully sees a valid
UploadedFile
for a .png file but for any .mp4 video, Laravel gets an invalidUploadedFile
with no size, no conent and the wrong path.Any ideas why mp4s don't seem to work but pngs do? Is it a bug in Cypress or something extra I need to do for mp4 files?
Cheers.
Beta Was this translation helpful? Give feedback.
All reactions