vendredi 1 avril 2016

where should i add specify extension for mime types in laravel??

$photo = Input::file('photo');

    if($photo) {
        $size = $photo->getSize();
        $mime = $photo->getMimeType();
        $orignalname = $photo->getClientOriginalName();
        $orignalextension = $photo->getClientOriginalExtension();


        $destination = "Documents/edifile/";
        $filename = time().str_replace(' ', '_', $orignalname);

        $photo->move($destination,$filename);

where i have add this line 'file' => 'required|max:10000|mimes:edi,jpeg' i want to upload this extension file only.?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire