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 totext
. - 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 thecontent_encoding
attribute tobase64
.
UsingContent-Type
multipart/form-data
the content can be any raw file, and can be send without further processing.