The mgmt api endpoint assumed image/gif content type. Instead try our best to detect it.
If the content type can't be determined then it defaults to application/octet-stream
Testing
I tested by uploading gif and jpg buddy icons via pidgin and I'm able to fetch them from the api. PNG did not work for me, but it also didn't display in pidgin, so that format may not be supported.
Summary
The mgmt api endpoint assumed image/gif content type. Instead try our best to detect it.
If the content type can't be determined then it defaults to application/octet-stream
Testing
I tested by uploading gif and jpg buddy icons via pidgin and I'm able to fetch them from the api. PNG did not work for me, but it also didn't display in pidgin, so that format may not be supported.
Unit tests pass