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

timgavin's avatar

Symnlink to external disk

My DigitalOcean server has a volume attached for storing media, it's available at /mnt/media

I want my file uploads to be stored on the volume, and available in the view at /media/filename.jpg.

I've tried creating a symlink in the public directory, which points to /mnt/media but it's not working correctly; keeps telling me it's not available. I'm thinking maybe this gets corrupted during a deployment?

I tried creating the symlink in Envoyer, using the Manage Linked Folders option, but it appears I can only add folders which are relative to the public and storage directories. It doesn't look like I can do absolute links.

Any thoughts on how I can do this?

0 likes
1 reply
timgavin's avatar
timgavin
OP
Best Answer
Level 11

Okay, so what had actually happened was that my local symlink had been uploaded during the deployment, overwriting the symlink in the public directory.

Added the local symlink to .gitignore and problem solved.

Please or to participate in this conversation.