Why is osTicket not recognizing the correct MIME type (image/png) for attachments uploaded via API even though the Base64 and type field are correct?
Is this:
A limitation or bug in the osTicket API?
A required setting in Admin Panel → Tickets / Attachments?
Something that must be configured in PHP upload settings or MIME detection?
Do I need to modify the API endpoint to manually set mime-type?
Any guidance or working example would be appreciated!
I M TRYING - Curl code and backend
curl --request POST \
--url https://EXAMPLE.COM/api/myfolder/create \
--header 'X-API-Key: 129865615D8DC548A9CD86C2CED9B22F' \
--header 'content-type: application/json' \
--data '{
"name": "John Doe",
"email": "john@example.com",
"phone": "1234567890",
"subject": "Test Ticket via API",
"message": "This is a test ticket created via the osTicket API.",
"topicId": 12,
"priority": 2,
"language": "H",
"attachments": [{
"name": "photo.png",
"type": "image/png",
"data":"iVBORw0KGgoAAAANSUhEUgAAAEA="
}]
}
'