Php artisan storage: link to delete stored files (DigitalOcean)
P粉790819727
P粉790819727 2024-03-29 23:54:06
0
1
437

Case: I uploaded a Laravel project on DigitalOcean using the following command in the Yaml file

run_command: |- 
php artisan migrate --force
php artisan storage:link
heroku-php-apache2 public/

Problem: Every time you deploy, these commands are run and the storage files are deleted. How to deploy without deleting uploaded files?

Additional Information:- 1-Table records are not deleted, only uploaded files are deleted 2- imagePath: base_url/storage/images/products/imageName.png

P粉790819727
P粉790819727

reply all(1)
P粉567112391

Solution: This is not a problem. The problem is that every time you deploy, DigitalOcean is deployed on a different server (container) every time, so it's like a new device. But the table is not cleared, just the stored stuff

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!