Unable to upload media assets to strapi locally

System Information
  • Strapi Version: 3.4.1
  • Operating System: macOS
  • Database: sqlite3 (locally)
  • Node Version: >=10.16.0 <=14.x.x
  • NPM Version: >=6.0.0
  • Yarn Version: 1.22.10

I’m receiving an “Internal Server Error, must supply api_key…” when trying to upload an image/asset during development. Production is completely fine. It seems as though all my cloudinary environment variables are setup correctly both in my code and on Heroku. So I’m at a complete loss right now.

Screenshot of errors:



Please let me know what I am doing wrong here. Any and all help would be greatly appreciated.

Hi, What does your .env file look like in your local environment? And where is it stored in your project directory?

1 Like
CLOUDINARY_NAME = cloudinary-name
CLOUDINARY_KEY = cloudinary-key
CLOUDINARY_SECRET = cloudinary-secret

I was just now reading something and came across the idea of having a .env file to store the cloudinary environmental variables. I swear I had these set before, but it didn’t work. I just set it up again, and now it works!!! But this time, I think I HAD put spaces between the ‘=’ and the variables thereafter. Thanks for the tip-off anyhow. Leading me in the right direction!

1 Like

No worries! It’s happened to me before.

1 Like