Despite cloudinary plugin for media after server-side Render.com spin-downs old (deleted!) media structure come back and break and provide /upload urls which break fe site

System Information

  • Strapi Version: v4.25.4
  • Node Version: v20.15.1
  • Deployment env: Render.com free tier

Plugins

module.exports = ({ env }) => ({
  upload: {
    config: {
      provider: "cloudinary",
      providerOptions: {
        cloud_name: env("CLOUDINARY_NAME"),
        api_key: env("CLOUDINARY_KEY"),
        api_secret: env("CLOUDINARY_SECRET"),
      },
      actionOptions: {
        upload: {},
        delete: {},
      },
    },
  },
});

Middleware

export default [
  "strapi::logger",
  "strapi::errors",
  {
    name: "strapi::security",
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          "connect-src": ["'self'", "https:"],
          "img-src": ["'self'", "data:", "blob:", "res.cloudinary.com"],
          "media-src": ["'self'", "data:", "blob:", "res.cloudinary.com"],
          upgradeInsecureRequests: null,
        },
      },
    },
  },
  "strapi::cors",
  "strapi::poweredBy",
  "strapi::query",
  "strapi::body",
  "strapi::session",
  "strapi::favicon",
  "strapi::public",
];

Issue description
In the moment of deleting all media and uploading again, they are linking to Cloudinary and everything is okay. Also on local environment. However on deployment with render.com, after a server spin-down and when it runs again, it has already deleted files with links to uploads, which breaks my front-end app. What I tried to do was completely delete and set up a new web app, but the problem persists. I am using the free Render tier with spin-downs and no SSH, because the configuration was instant and Azure DevOps is overwhelming for me. I know the obvious solution is to take paid basic no spin down tier but for some time I need this site on instant it will work and after I will stop paying this will be broken again so I need to figure out why is it reverting this state. Obvious answer seem to be cache related issues but ain’t re creating app-service from scratch up should solve this? When I look for any name of those files on my local cms app i cannot find any match so in local files I push to git there are non old upload media files.

Steps to Reproduce:

  1. Upload media files in Strapi CMS.

  2. Server spins down and restarts (using free tier Render service).

  3. Media files are no longer accessible, and links point to deleted files.

Attempts to Fix:

• Deleted all files and re-uploaded.

• Set up a new web app.

• Problem persists with each server restart.

Environment:

• Free Render tier with server spin-downs.

Request:

Looking for advice on how to maintain media file integrity after server spin-downs and restarts.