STRAPI: The upload folder (/data/public/uploads) doesn’t exist or is not accessible

Hey all.

I’m trying to deploy a Strapi app to Render, and I keep getting this error message The upload folder (/data/public/uploads) doesn't exist or is not accessible and I have created this directory with a .gitkeep in it and deployed but it’s still not being found.

Set up for this is in/config/env/production/server.js (see below)

module.exports = ({ env }) => ({
  url: env("RENDER_EXTERNAL_URL"),
  dirs: {
    public: "/data/public"
  },
});

and help would be very welcomed,
P

Hi,

It sounds like you’re using a Render Disk, with a mount path of /data/public. This will be available on the running instance only (not at build time).

A .gitkeep wouldn’t be doing anything for the disk as the mount path is from the root of the filesystem, not relative to your codebase/repo.

So it sounds like there is no uploads folder present under the disk’s mount path. Maybe you could try and create one using the service “Shell” tab: mkdir /data/public/uploads

Alan

Hey @al_ps that is correct – aha, that makes sense, I’d not thought about using the shell for this.

I just tried that, and still no joy, unfortunately. I’m assuming it should be in ~/project/src?

No, as I mentioned previously:

…the mount path is from the root of the filesystem, not relative to your codebase/repo.

If you want us to take a closer look, please feel free to raise a ticket from “Help” or “Contact Support” links in the dashboard.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.