Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

zerohour's avatar

Envoyer Deployment removes my uploaded media

So I have an application that uploads media into public/uploads/{member_id}/file.ext

As expected when a new deployment is done, the uploads no longer work as the public folder is created new.

My question is, How can I either MOVE the contents of public/upload to the new release or create something similar to how the storage folder works, which is maintained across deployments.

0 likes
2 replies
lostdreamer_nl's avatar
Level 53

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

Basically: you

  • should upload all public files to "storage/app/public"
  • use the php artisan storage:link command to setup a symlink between "public/storage" and "storage/app/public"
  • use {{ asset('storage/{memberId}/file.ext') }} as links to your public uploads

And dont forget to add the symlink to your repo or it will disappear on your next deploy ;)

zerohour's avatar

@LOSTDREAMER_NL - Thanks, I was hesitant to do this for some reason as I have a live site. But I made the changes and all seems well.

Please or to participate in this conversation.