Replies: 1 comment 1 reply
-
I'd suggest only using |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a sveltekit app that lets the user upload images to the
/static/img
directory using writeFile (fs) and access it right away from their homepage.It works fine when I run it locally but when I deploy the app to coolify the images in the
/static/img
directory are not persistent, meaning they get deleted after each redeployment.I tried making it persistent by mounting a volume, which worked, but I can't really access the images in that directory from my homepage during runtime (e.g. by using
<img src="/img/test.jpg" />
or visiting their direct url at https://website.com/img/test.jpg).I'm new to docker and coolify and I've been searching for a solution for hours but can't figure out how I should do it.
I don't want to use an image CDN.
This is my
/api/upload/server.js
file that uploads the images to the/static/img
directory:Beta Was this translation helpful? Give feedback.
All reactions