When source file must be converted multiple times, conversion performance can be increased by uploading file once and converting it multiple times without uploading it once again. Uploaded file will be stored in convertapi.com server for 3 hours and will be accessible just by conversion system. In conversion request file can be referred by the File ID, which will be given after file upload. Another benefit of uploaded file is that conversion request can be formed just by URL query (no need for multipart or json formatters).
File upload request
File upload response content type is controlled by "Accept" header field value. Default "Accept" header field value is "application/json". If request header has "Accept: text/plain" field, response body will contain plain File ID string. This response format is useful when there are no JSON or XML parsers.
File data must be encoded with Base64 encoding.
Each request parameter must be in separate part.
Raw file data upload is most simple and efficient upload type. Must be provided content-disposition header field with the file name.
Upload from remote URL
If file is accessible by the URL, it can be uploaded directly from it's location.
Additionally can be provided "HeaderName" and "HeaderValue" parameters, needed for integration with third party systems like Google Drive.
File upload request HTTP response codes
Upload completed successfully.
Internal codes provided in response body:
- 5007 - Unable to download remote file.
Actions with the uploaded file
Delete uploaded file
If file is no longer required it can be deleted.