Images
Endpoints for uploading, deleting, listing, and accessing images.
These endpoints allow you to upload, delete, list, and access images.
POST /api/upload
Upload an image file. Requires a valid upload key.
- Method: POST
- Path:
/api/upload
- Source: handlers.go
Headers
X-CSRF-Token
: CSRF token from login/refresh
Form Data
file
: Image file (required)
Response
Example
Errors
- 400: Invalid request, file too large, file type not allowed, storage limit reached
- 401: Not authenticated
- 403: Invalid CSRF token
- 500: Internal server error
DELETE /api/delete/{uuid}
Delete an image by UUID. Requires authentication and CSRF token.
- Method: DELETE
- Path:
/api/delete/{uuid}
- Source: handlers.go
Headers
X-CSRF-Token
: CSRF token from login/refresh
Example
Response
- 200: Image deleted
- 401: Not authenticated
- 403: Invalid CSRF token
- 404: Image not found
- 500: Internal server error
GET /api/list
List all images. Requires authentication.
- Method: GET
- Path:
/api/list
- Source: handlers.go
Response
Example
Errors
- 401: Not authenticated
- 500: Internal server error
GET /api/images/{id}
Get image details by ID. Requires authentication.
- Method: GET
- Path:
/api/images/{id}
- Source: handlers.go
Response
Example
Errors
- 401: Not authenticated
- 404: Image not found
- 500: Internal server error
GET /api/proxy/{uuid}.{ext}
Serve an image via authenticated proxy, this request doesn't count as a view for analytics. Requires authentication.
- Method: GET
- Path:
/api/proxy/{uuid}.{ext}
- Source: handlers.go
Example
Response
- 200: Image file
- 401: Not authenticated
- 404: Image not found
- 500: Internal server error
GET /{uuid}.{ext}
Serve a public or private image by UUID and extension. For private images, a key query parameter is required.
- Method: GET
- Path:
/{uuid}.{ext}
- Source: handlers.go
Query Parameters (for private images)
key
: base64-encoded private key
Example
Response
- 200: Image file
- 404: Image not found or invalid key
- 500: Internal server error