[Vuejs]-CORB blocked cross-origin response <URL> with MIME type text/html

0👍

If you’ve made the symbolic link with php artisan storage:link, then the url you should be using is not /storage/app/public/{image}. It’s /storage/{image}.

https://laravel.com/docs/9.x/filesystem#the-public-disk

I think your request ends up being text/html because it’s throwing a 404.


By default, storeAs will use the default disk. You could pass the public disk as a third argumeent.

https://laravel.com/docs/9.x/filesystem#specifying-a-disk

$image->storeAs('images', $imageName, 'public');

With that done, you should be able to access the image with

<img :src="'http://localhost:8001/storage/images/'+formulir.image">

Leave a comment