dimanche 17 juin 2018

How I save the file on server in Laravel PHP

I have send the file(Ex: A image) using Form data in JS and data received in Laravel backend side.

Array
(
    [filename] => imageedit_1_7173872236.png
    [filetype] => image/png
    [value] => iVBORw0KGgoAAAANSUhEUgAAAjgAAAJFCAYAAADQyY3pAACAAElEQVR42uz9e
)

$emailFile = $userData['avatar']['filename'] ?? '';

After that I have set the path to save the file but couldn't save it.

$destinationPath = public_path('voiceRecording');

$emailFile->move($destinationPath, $emailFile);

Please help me?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2HX7Lkc
via IFTTT

Aucun commentaire:

Enregistrer un commentaire