[Vuejs]-How to set file storage path prefix in vue.js?

0👍

For anyone who has this problem please try

Storage::getDriver()->getAdapter()->setPathPrefix('/your/prefix/here');

or

Storage::disk('discName')->getDriver()->getAdapter()->setPathPrefix('/your/prefix/here');

before saving your file

-1👍

do that to create shortcut to storage/app/public

php artisan storage:link

save image

$file = $request->file('image')->store('images','public');

to get url of image example

<img :src="'/storage/' + response.imagePath">

Leave a comment