Larave 5.2 - File Upload not work

Posted 2 years ago by cschoeni

When i upload a file. Give my with the dd($request->file('slim')); only null.

My Form

<form action="/photo/upload" files=true method="post">
    {!! Form::token() !!}
    <div class="slim" data-label="Drop your avatar here" data-size="240,240" data-ratio="1:1">
        <input type="file" name="slim" required />
    </div>
    </div> <!-- /.modal-body -->
        <div class="modal-footer">
         <button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
        <button type="submit" class="btn btn-primary">Speichern</button>
    </div>
</form>

My Controller

public function store(Request $request)
    {
        dd($request->file('slim'));
    }

My route

Route::post('/photo/upload', ['as' => 'store', 'uses' => 'Artist\[email protected]']);

The upload form I bought on http://preview.codecanyon.net/item/slim-image-upload-and-ratio-cropping-plugin/full_screen_preview/16364167?_ga=1.109654277.1615792691.1470001455

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

Reply to

Use Markdown with GitHub-flavored code blocks.