When laravel uses ajax and formData() to upload files, $request->file() cannot obtain the file information. What should I do?
给我你的怀抱
给我你的怀抱 2017-05-31 10:31:43
0
2
1083

Using $_FILES can get information, but I want to use laravel's $request to get the information and process it. Does anyone have a solution?

给我你的怀抱
给我你的怀抱

reply all(2)
Ty80

Print $request->headers and see what the Content-Type sent by ajax is. Generally, the Content-Type is wrong.

淡淡烟草味

If the file is cross-domain, the file may not be received. I don’t know what your specific situation is.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template