Environment Production Setting for Upload

Hi Guys,

to this day I am not happy with my upload function. The first problem is that I don’t yet know how to write the config file. That’s why my upload does not work under Production Mode, but I can upload an image under Development Mode without any problems. To show the difference I took two screenshots.
Who can show me how to correctly configure my upload under Production Mode? :nachdenklich:

Thanks in advance!

StackOverflow:
https://stackoverflow.com/questions/64705640/environment-production-setting-for-upload

What Strapi version are you using currently?

1 Like

Hello DMehaffy,
thanks for the quick response!
“strapi”: “3.0.1”
:thinking:

Can you please make a screenshot of the /config folder will all the folders/files expanded, so I could understand what configs do you have there?

1 Like

unfortunately I still don’t know how and where to configure it. :frowning: :snail:

2020-11-07 15_50_18-Window

Can you run: yarn why strapi-plugin-upload on dev and prod envs. Share here output from both envs.

I’m uninstalling responsive-img and try again. Moment please…!

2020-11-07 16_55_37-Environment Production Setting for Upload - Questions and Answers _ Strapi Backe

Unfortunately, I can’t continue writing at the moment. :frowning: In the meantime I’m trying to find out myself :snail: and will get back to you tomorrow. :slightly_smiling_face: Thank you very much! :+1:

Hmm, As I understand you are using files from a third party plugin called responsive-image to overwrite the strapi’s upload plugin? Also, I see that you locally have 3.0.1 plugin but that plugin is using 3.2.5, that may cause some issues.

1 Like

The fastest fix I would suggest is to upgrade your strapi version to 3.2.5, but take care to follow All the migration guides.

Do you have your project as a public repo on git?

1 Like

I’ve manually elevated your user trust level so you shouldn’t hit that limit again. It’s one of our spam prevention methods.

1 Like

Thank you very much! :+1:

@sunnyson Sorry for the interruption yesterday! Yesterday I was not allowed to continue writing because I am a “new user”.

I have my strapi project on v. 3.2.5 upgraded. It actually saves thumbnails! :slight_smile:

Unfortunately, the “Environment Production Setting for Upload” problem has not yet been resolved. :thinking:

Can you share all the files that you use in extensions/upload, so I could test them locally?
Be aware to not share some secret stuff.

Or even better, if your project is public on git I could clone it and test on my environment.

Will it be enough if I share a project without an “API” folder? :slightly_smiling_face:
Moment please…

Of course, I don’t need the API folder. Send it to PM.

1 Like

Also please provide Node, yarn/npm, db versions.

So, since you are using strapi.store, please note that its value is stored in DB per environment!

In your case you are using the code from below and you are getting NULL, that means you don’t have the key called plugin_upload_provider in core_store table/collection with environment='production'
image

An example how strapi.store get values from DB:

You can check in your DB that you have plugin_upload_provider for development env but it’s missing for production.

A solution would be to duplicate the same config row but with a modified environment.

1 Like