Upload file issue via REST API call

Hi i was trying to upload file via REST api https://developer.infusionsoft.com/docs/rest/#!/File/createFileUsingPOST but getting following error:

{"message":"FileUploads must have an extension. \nUnsupported file type."}

im using base64 jpeg file as well as tested with png file, but same error persists?

please guide me how to fix this?

thanks

ok after doing some tests i noticed the file extension must be in ‘file_name’ variable, e.g in following sample code string.jpg must be used if file data is jpg file

{
  "file_name": "string.jpg", 
  "file_data": "string",
  "contact_id": 0,
  "is_public": true,
  "file_association": "CONTACT"
}

See @bradb comment in the following post. It lists all the acceptable file extensions: