Strapi v4.10.1 generates multiple API Upload directories

System Information
  • Strapi Version: 4.10.1
  • Operating System: macOS, Docker
  • Database: sqlite
  • Node Version: 18
  • NPM Version:
  • Yarn Version:

Hey,

our Strapi instance creates in production multiple API Upload-Directories. It seems, that on every restart / deployment a new Upload folder is created.

We are deploying via docker compose. But there are multiple of these directories. Do you have any ideas about it?

Thanks!

This problem occurs when using the config-sync plugin which communicates a different id to strapi.

e.g. in dev the API Uploads directory has the id 1, which is persisted in the config’s json file. But in staging it is id 26, which is why it creates a new one, because an api uploads folder with id 1 cannot be found.

We ignored the api upload folder configuration for now:

excludedConfig: ["core-store.plugin_upload_api-folder"],

Nice find @n2o!

I’m the creator/maintainer of the config sync plugin and I regularly search the Strapi Forums & Discord on the mention of my plugin to find people having issues with it. That how I found this one.

The exclusion you made should be a default exclusion as the data that is stored in that piece of config is environment specific and does not need to be migrated across environments. I’ll make this change and publish it soon.

Thanks for finding this bug :slight_smile:

Happy to help you. Was not sure if that is a real bug, was still investigating it.

Great, thanks for your fast reply :+1:

Solution is to add this fix or wait for the next release of the great config-sync plugin :+1:

I’ve updated the config sync plugin to exclude the api-folder config by default.
It has been released with version 1.1.3

Thank you :slight_smile: