This error indicates a Cloudinary configuration issue. Follow these steps to resolve it:
In Val Town, go to your project → Environment Variables and verify these are set:
Required:
CLOUDINARY_CLOUD_NAME - Your Cloudinary cloud nameChoose ONE of these options:
Option A: Unsigned Upload (Easier)
CLOUDINARY_UPLOAD_PRESET - Your unsigned upload preset nameOption B: Signed Upload
CLOUDINARY_API_KEY - Your Cloudinary API keyCLOUDINARY_API_SECRET - Your Cloudinary API secretFor easier setup, create an unsigned upload preset:
CLOUDINARY_UPLOAD_PRESET=your_preset_name to Val Town environment variablesUse the debug tool in ChatGPT:
Test my Cloudinary configuration
This will run the opencloset.test_cloudinary tool and show you:
Solution: Your Cloudinary account might be suspended or the cloud name is incorrect.
Solution: Your API credentials are incorrect.
Solution: The upload preset doesn't exist or is named incorrectly.
Solution: There's an issue with the signed upload.
If you want to test Cloudinary directly, you can use curl:
# Test unsigned upload curl -X POST \ https://api.cloudinary.com/v1_1/YOUR_CLOUD_NAME/image/upload \ -F "file=https://images.unsplash.com/photo-1521572163474-6864f9cf17ab" \ -F "upload_preset=YOUR_PRESET_NAME"
Replace YOUR_CLOUD_NAME and YOUR_PRESET_NAME with your actual values.
Make sure your environment variables are set exactly like this in Val Town:
CLOUDINARY_CLOUD_NAME=mycloud
CLOUDINARY_UPLOAD_PRESET=opencloset
NOT like this:
CLOUDINARY_CLOUD_NAME="mycloud" ❌ (no quotes)
CLOUDINARY_CLOUD_NAME= mycloud ❌ (no spaces)
If you're still having issues:
CLOUDINARY_CLOUD_NAMECLOUDINARY_UPLOAD_PRESET