Surveys - Upload Logo
Enterprise
This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.
Endpoint
/i/feedback/upload
Overview
Uploads survey branding images and stores them in GridFS.
Authentication
Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.
Permissions
- Global Plugins:
Updatepermission.
Request Parameters
Multipart form-data:
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | String | Yes (or auth_token) | API key authentication |
auth_token | String | Yes (or api_key) | Auth token authentication |
feedback_logo | File | Conditional | Primary feedback logo key |
file | File | Conditional | Generic upload key when name is provided |
name | String | Conditional | Target file key for generic upload |
Examples
curl -X POST "https://your-server.com/i/feedback/upload?api_key=YOUR_API_KEY" \
-F "feedback_logo=@./survey-logo.png"
Response
Success Response
{
"result": "Success"
}
Response Fields
| Field | Type | Description |
|---|---|---|
result | String | Upload status |
Error Responses
- HTTP 400 - File too large or invalid:
{
"result": "feedback.image-error"
}
- HTTP 400 - File read/processing issue:
{
"result": "feedback.imagee-error"
}
Behavior
- Requires
global_pluginsupdate permission. - Accepts
feedback_logoto overwrite the global feedback logo. - Alternatively accepts generic
fileplus requirednameto write a named file into the feedback GridFS bucket. - Returns
Missing file: feedback_logo or filewhen no usable upload field is present. - Returns
Missing parameter: namewhenfileis used withoutname. - Maximum file size is 1.5 MB.
- Converts the file to a base64 data URI and writes it to GridFS bucket
feedbackwithwriteMode=overwrite.
Limitations
- Only image file inputs are supported.
- One file is processed per request.
Related Endpoints
Implementation details
Database Collections
| Collection | Used for | Data touched by this endpoint |
|---|---|---|
countly_fs.feedback.files | Endpoint data source | Stores endpoint-related records this endpoint reads or modifies. |
countly_fs.feedback.chunks | Endpoint data source | Stores endpoint-related records this endpoint reads or modifies. |