System Information
I’m hosting Starpi CMS with free Render web app tier.
- Strapi Version: v4.25.4
- Node Version: v20.15.1
- Deployment env: Render free tier
observed similar issues
3 years ago similar issue was spotted, and the conclusion was cache is not being emptied properly, and you had a thought then that you should add feature to manually clean it, it’s not done yet or I cannot find it? But anyways as described below, I recreated all app but with old name and old file structure persist so or even cache after project delete is not cleaned or I somehow deliver this broken structure.
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:
-
Upload media files in Strapi CMS.
-
Server spins down and restarts (using free tier Render service).
-
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.