mardi 10 octobre 2017

Laravel stored svg file as html

Helo everyone. I try to make simple media library and have strange issue during svg upload. here are my controller method:

$file = $request->file('image');
            $data['name'] = $file->store('/media/original', 'public');
            $data['mime_type'] = $file->getMimeType();
            $data['file_size'] = $file->getSize();
            $data['file_status'] = 1;

            Gallery::create($data);

A problem is svg stores with .html extension. $file->getMimeType(); returns text/plain



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire