Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Upload types Files deleted after second deployment

default discord avatar
godoymslast year
6

Hello. I kindly ask for your help with an issue in my deployment phase. I'm deploying my Payload cms app to digital ocean in App Platform service. The thing is that when I first successfully deployed and upload some images to my collections everything worked as expected. However, when I just deployed a second version of my app with very few changes, all the previous upload files were deleted . Thanks in advance

  • default discord avatar
    r3pwnlast year

    If you're not using any kind of cloud storage plugin, I believe this is expected, as those images live in temporary storage in each deployment, so if you were to deploy again, all of your current images will be lost, as well



    These deployments don't have any kind of "permanent" storage, so you'll want to switch to using some kind of cloud storage plugin in Payload. I use the Google Cloud Storage plugin, and my bill is a whopping $0.00 because cloud storage is insanely cheap.



    https://github.com/payloadcms/plugin-cloud-storage#gcs-adapter
  • default discord avatar
    godoymslast year

    Thanks a lot

  • default discord avatar
    r3pwnlast year

    No problem! 🙂

  • default discord avatar
    techinvertedlast year

    @r3pwn how about the local storage plugin? Is that persistent?

  • default discord avatar
    donfabriziolast year

    It is persistent if you use a VPS for example, so a Virtual machine that you manage (Digital Ocean Droplets...). If you use a fully automated deployment service (Vercel, DO App cloud, Heroku...) you most likely won't have a permanent fiel system so the local storage plugin will work, but every deploy will see your media deleted.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.