File uploads

There are three different methods for uploading file content to Transifex:

Using Content-Type application/vnd.api+json the content must be JSON serializable.

  • For content that is directly JSON serializable you can dump the content of the file directly and set the content_encoding attribute to text.
  • For any content, even if it's not JSON serializable (eg .xlsx, .idml or .docx file extensions), you can encode the file using the base64 encoding and set the content_encoding attribute to base64.
    Using Content-Type multipart/form-data the content can be any raw file, and can be send without further processing.