A
A
alexanderqwert2018-02-11 15:31:27
PHP
alexanderqwert, 2018-02-11 15:31:27

I can't send a file via POST request, what's the problem?

Route::post('/files/store', '[email protected]'); // роут

    public function store(Request $request) // метод
    {
        dd($request->file('file'));
    }

I send via Postman or
CURL headers
Content-Type: multipart/form-data
Accept: application/json
I get an error
Warning: Missing boundary in multipart/form-data POST data in Unknown on line 0

5a8037853f288045218270.png
second
5a80379a6bb87112483699.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LeoCata, 2018-02-11
@LeoCata

How about trying application/x-www-form-urlencoded?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question