API Developers Guide

Resources > Create File Resource

Create a new file entity on One Hour Translation.

After the resource entity is created, it can be used on job requests such as translation, proofreading, etc.

Read more about supported content formats here.

Notice: This request must be encoded as multipart/form-data for file upload to succeed. Please read here for more information.

POST: /resources/file
Request Params
ParametersDescription

file_name

(optional) Replace the original file's name on One Hour Translation.

file_mime

(optional) Replace the default mime value for the file.

upload

File content to upload, submitted via multipart/form-data request.
Response Params
ParametersDescription

Resource UUID

Use this unique identifier when creating a new job request

Request Example

curl -i -F secret_key=<SECRET_KEY> -F public_key=<PUBLIC_KEY>
-F upload=@/home/user/test.txt 
https://www.onehourtranslation.com/api/2/resources/file

Response Example

{
  "status":
  {
    "code":0,
    "msg":"ok"
  },
  "results": ["rsc-5270f421267822-79952796"],
  "errors":[]
}