By Whathetech
Hi!
I am currently running a node.js code via an app in DigitalOcean, which is located in my github repository. The result of the code are some images that should be stored in the github repository. The console of the app tells me that the images have been saved in the workspace, but I don’t understand what this is supposed to be. Does anyone have an idea?
Many thanks in advance!
Regards Max
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey Max! 👋
The “workspace” you’re seeing in the app logs refers to the local file system of your DigitalOcean App Platform instance.
When your Node.js app saves files, they’re stored in the instance’s local storage temporarily.
However, the App Platform storage is ephemeral. This means that any files saved there will be lost if the app restarts, scales, or redeploys.
If you want your images to persist, you’ll need to use an external storage solution. DigitalOcean Spaces (an S3-compatible object storage) is a great option for such use-cases! You can configure your app to upload the images to Spaces instead of relying on local storage.
Here’s a guide to get you started with Spaces:
https://www.digitalocean.com/community/tutorials/how-to-upload-a-file-to-object-storage-with-node-js
And here is a link to the official DigitalOcean documentation:
Let me know if you have any questions!
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.