Appearance
Managing Upload Keys
Upload Keys are Public
Upload keys are safe to use in frontend code and client-side applications. They're designed for temporary image uploads from browsers with origin restrictions for security.
Upload Key Structure
Upload keys are used directly in the upload URL path:
javascript
const uploadKey = "upl_abc123def456...";
const response = await fetch(`/api/v1/upload-temporary-image/${uploadKey}`, {
method: "POST",
headers: { "X-Original-Filename": file.name },
body: file,
});
Find Your Upload Keys
- Go to your project dashboard
- Navigate to the "Upload Keys" tab
- View all upload keys for the current project
- Copy the key you need for your application
Create a New Upload Key
- In your project dashboard, go to "Upload Keys"
- Click "New Upload Key"
- Give it a descriptive name (e.g., "Frontend App", "Mobile Upload")
- Configure allowed origins for the new key
Configuring Allowed Origins
Upload keys use origin restrictions for security:
- Find the upload key in your project dashboard
- Click "Edit Origins"
- Add allowed origins (e.g.,
https://example.com
,http://localhost
) - Save the changes
The server validates the Referer header against these origins on each upload.
See Allowed origins for more information.
Configuring Temporary Image Expiry Time
Under project settings, you can configure the amount of hours temporary images are stored for.