dib258
136
8
General

Upload errors when Laravel app online

Posted 3 years ago by dib258

Hi,

I putted my laravel app online with Forge. During the testing, I encountered a bug with an input who need to upload a video. Everything was working in local.

I got a 413 error because there were limitations on the serveur. I followed this thread : https://laracasts.com/discuss/channels/forge/413-request-entity-too-large-nginx162

And no more error 413. But now, when I try to upload at the validation it stop and return me this error message :

The video field is required. 

I barely touched the code and everything still works in local. So why is this upload not working when online ? Do you see a reason why this shouldn't work ? a problem on the serveur ?

I tried to put a code to see what's the uploaded files like this :

dd(Input::file('video'));

And here's the result :

UploadedFile {#27 ▼
  -test: false
  -originalName: "What_a_wonderful_world_-_LOUIS_ARMSTRONG.mp4"
  -mimeType: "application/octet-stream"
  -size: 0
  -error: 1
}

How is it possible that now my file has no size and can I retrieve the error's message ?

Thanks in advance

Edit : the result from the die and dump in local is :

UploadedFile {#28 ▼
  -test: false
  -originalName: "What_a_wonderful_world_-_LOUIS_ARMSTRONG.mp4"
  -mimeType: "video/mp4"
  -size: 6188310
  -error: 0
}

Is it normal that the mime type is also different ? a result from the error ?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.