Image Upload Process
Understanding how event image uploads work in Kommunity
Overview
Kommunity uses Amazon S3 for storing images with presigned URLs to securely handle direct browser-to-S3 uploads. This document explains how the image upload flow works and how to implement it in your applications.
How It Works
The image upload process involves three main steps:
- Generate Presigned URL: Request a presigned S3 URL from our API
- Upload to S3: Upload the image directly to S3 using the presigned URL
- Get CDN URL: Store the resulting CDN URL for future use
API Endpoint
To get a presigned URL, make a POST request to our upload URL endpoint:
Response
upload_url
: Use this URL to upload your file via PUT requestimage_url
: The CDN URL where your image will be accessible after upload
Client Implementation
Here's how to implement the upload process:
Use the uploaded image
Finally, use the returned CDN URL in your application:
This URL is now permanently accessible and can be stored in your database with event details.