laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.48k stars 419 forks source link

Upload Image using Lumen framework #861

Closed manciuzz closed 5 years ago

manciuzz commented 5 years ago

Description:

My form:

<input id="image" type="file" name="image" accept="image/png, image/jpeg"/><br>
<input type="submit" value="Įkelti"/>
</form>```

My Controller:

public function WriteNewsFromControlPanel(Request $request){ $this->validate($request, [ 'image' => 'required|image|max:5000', ]);

$image = $request->file('image');

 return $image;

When i try to upload image, I'm getting an error: The image must be an image.
driesvints commented 5 years ago

Hi there,

Looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library. If you have a question on how to use functionality provided by this repo you can try one of the following channels: