You need to upload your images to the storage/app/public directory instead of the public/storage directory. If you configure everything correctly in your config/filesystems.php and use the public driver there. You also need to run php artisan storage:link. After that, all uploads should go to the correct directory.
Feb 9, 2020
2
Level 1
Unwanted upload images in public directory
My project is by Laravel6. I linked storage to upload images for my posts and categories. Images are uploaded correctly to the post and category sub-folders under the public/storage directory. But problem is, when ever I upload an image, a copy of the image stored in the public directory, no other sub-folder, just under the .htaccess file. I have no control over those images. When I delete a post or a category, related images in the post or category folder deleted as wanted, but images stored in the public folder remain. Now how I can stop this unwanted upload of images in the public folder?
Please or to participate in this conversation.