Media is always deleted after deployment

System Information
  • Strapi Version: 4.1.7
  • Operating System: “stack” (based on ubuntu) by heroku
  • Database: PostgreSQL
  • Node Version: 16.13.1
  • NPM Version: 8.1.2
  • Yarn Version: 1.22.18

Hello,
Every time after I make changes to the contenttype format in develope mode (locally) and push my changes to Heroku via git, the existing content posts have their stored media deleted. Although I still see the corresponding tiles and information in the Media Library, the files are no longer present and I only see an empty placeholder. What could be the reason for this?

If I am not hugely mistaken - Heroku resets it’s file-storage on each cycle - you can not keep your media files there. That is why many devs keep their files on S3 buckets or systems like Cloudinary (there are tutorials for this).

Thanks for the advice, im gonna try that!