---
updatedAt: 2026-07-30T11:04:09.000Z
agentTools:
  projectIndex: https://developer.orangelogic.com/llms.txt
---

# Upload new media

Upload a single file from your computer to Orange Logic

> ℹ️ Notes
>
> There are three versions of the Upload Media API:
>
> * **v3.0** is the most robust. It takes all the parameters listed below, and it accepts either a record ID or a unique identifier for the FolderRecordID parameter.
> * **v2.0** uses a boolean ProcessAssetInBackground parameter in place of the UploadMode parameter, just like the [Upload media API](https://developer.orangelogic.com/reference/upload-media-endpoint) does. It doesn’t take the IgnoreCheckContainer or Metadata query parameters.
> * **v1.0** is the most basic. It doesn’t take the UploadMode, IgnoreCheckContainer, or Metadata query parameters.

This API returns [standard headers](https://developer.orangelogic.com/reference/responses-headers#headers) in an **APIRequestInfo** section.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "upload-media",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{OrangeLogicURL}/api/UploadMedia",
      "variables": {
        "OrangeLogicURL": {
          "default": "OrangeLogicURL"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v3.0/UploadNewMedia": {
      "post": {
        "summary": "Upload new media",
        "description": "Upload a single file from your computer to Orange Logic",
        "operationId": "upload-new-media",
        "parameters": [
          {
            "name": "FolderRecordID",
            "in": "query",
            "description": "<a href=\"https://developer.orangelogic.com/reference/assets#record-id\">RecordID</a> of the folder to upload the asset to. If you are using v3.0, you can use the Unique ID or the Record ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UploadMode",
            "in": "query",
            "description": "Determines how the upload is processed in the background. Go to <a href=\"https://developer.orangelogic.com/reference/upload#upload-processing-options\">Upload processing options</a> for more information.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "processInLine",
                "ProcessProxiesInBackground",
                "ProcessFullyInBackgroundLite",
                "ProcessFullyInBackground",
                "ProcessProxiesAndParentAndIndexInBackground"
              ],
              "default": "ProcessInLine"
            }
          },
          {
            "name": "FileName",
            "in": "query",
            "description": "A name for the file being uploaded, including the file extension. For example: London Eye.jpg",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The response format.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "XML",
                "JSON"
              ]
            }
          },
          {
            "name": "IgnoreCheckContainer",
            "in": "query",
            "description": "Whether to check that the FolderRecordID represents a container.<ul><li><code>False</code>: The upload will fail if the FolderRecordID does not represent a folder.</li><li><code>True</code>: The file is uploaded to the first container in the hierarchy that includes the asset identified by the FolderRecordID.</ul>",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "Metadata",
            "in": "query",
            "description": "<a href=\"https://developer.orangelogic.com/reference/metadata-field-identifiers\">Metadata</a> applied to the uploaded asset.",
            "schema": {
              "properties": {
                "[Custom_Metadata]": {
                  "type": "string",
                  "description": "Enter a comma-separated list of field name and value pairs, enclosed in curly brackets <code>{}</code><br>Example: <code>{\"CoreField.Title\":\"New asset title\", \"MyNameSpace.MyField\":\"Custom field value\"}</code>"
                }
              },
              "type": "object"
            }
          },
          {
            "name": "dateformat",
            "in": "query",
            "description": "The output <a href=\"https://developer.orangelogic.com/reference/date-and-time\">date forma</a>t",
            "schema": {
              "type": "string",
              "default": "yyyy-MM-ddTHH:mm:ss"
            }
          },
          {
            "name": "Token",
            "in": "query",
            "description": "An authentication token. If empty, the token included in the current cookie is used.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "The <code>multipart/form-data</code> header parameter is required for this call.",
            "schema": {
              "type": "string",
              "default": "multipart/form-data"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "InputStream"
                ],
                "properties": {
                  "InputStream": {
                    "type": "string",
                    "description": "The file to upload",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"APIRequestInfo\": {\n    \"ProviderVersion\": \"MILAN.R4.2162P.218145\",\n    \"ProviderIdentity\": \"OLU-T-USW2-APP\",\n    \"ProviderID\": \"44ddde3ac27a33c394335f249d4007d4\",\n    \"Module\": \"UploadMedia\",\n    \"APIVersion\": \"v3.0\",\n    \"Resource\": \"UploadNewMedia\",\n    \"IsLoggedIn\": true,\n    \"Status\": \"LoggedIn\",\n    \"UserLogin\": \"\",\n    \"Session\": \"No session (production configuration)\",\n    \"TimeoutPeriodMinutes\": 120\n  },\n  \"APIResponse\": {\n    \"RequestInterpretation\": {\n      \"ParametersInformation\": {\n        \"FolderRecordID\": {\n          \"Value\": \"ZZ1282Z\",\n          \"IsOptional\": false,\n          \"ValueCount\": 1\n        },\n        \"InputStream\": {\n          \"Value\": \"Binary data\",\n          \"IsOptional\": false,\n          \"ValueCount\": 0\n        },\n        \"FileName\": {\n          \"Value\": \"Mangovations.png\",\n          \"IsOptional\": false,\n          \"ValueCount\": 1\n        },\n        \"UploadMode\": {\n          \"Value\": \"ProcessInLine\",\n          \"IsOptional\": false,\n          \"ValueCount\": 1\n        },\n        \"IgnoreCheckContainer\": {\n          \"Value\": \"false\",\n          \"IsOptional\": true,\n          \"ValueCount\": 1\n        },\n        \"Metadata\": {\n          \"Value\": \"{&quot;CoreField.Title&quot;:&quot;Mangovations logo&quot;, &quot;CoreField.Description&quot;: Approved logo for 2025&quot;}\",\n          \"IsOptional\": true,\n          \"ValueCount\": 1\n        }\n      }\n    },\n    \"Response\": {},\n    \"ExecutionStatus\": \"Executed\",\n    \"HTTPCode\": 200,\n    \"Code\": \"SUCCESS\",\n    \"SystemIdentifier\": \"ZZ1409J\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "APIRequestInfo": {
                      "type": "object",
                      "properties": {
                        "ProviderVersion": {
                          "type": "string",
                          "example": "MILAN.R4.2162P.218145"
                        },
                        "ProviderIdentity": {
                          "type": "string",
                          "example": "OLU-T-USW2-APP"
                        },
                        "ProviderID": {
                          "type": "string",
                          "example": "44ddde3ac27a33c394335f249d4007d4"
                        },
                        "Module": {
                          "type": "string",
                          "example": "UploadMedia"
                        },
                        "APIVersion": {
                          "type": "string",
                          "example": "v3.0"
                        },
                        "Resource": {
                          "type": "string",
                          "example": "UploadNewMedia"
                        },
                        "IsLoggedIn": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "Status": {
                          "type": "string",
                          "example": "LoggedIn"
                        },
                        "UserLogin": {
                          "type": "string",
                          "example": ""
                        },
                        "Session": {
                          "type": "string",
                          "example": "No session (production configuration)"
                        },
                        "TimeoutPeriodMinutes": {
                          "type": "integer",
                          "example": 120,
                          "default": 0
                        }
                      }
                    },
                    "APIResponse": {
                      "type": "object",
                      "properties": {
                        "RequestInterpretation": {
                          "type": "object",
                          "properties": {
                            "ParametersInformation": {
                              "type": "object",
                              "properties": {
                                "FolderRecordID": {
                                  "type": "object",
                                  "properties": {
                                    "Value": {
                                      "type": "string",
                                      "example": "ZZ1282Z"
                                    },
                                    "IsOptional": {
                                      "type": "boolean",
                                      "example": false,
                                      "default": true
                                    },
                                    "ValueCount": {
                                      "type": "integer",
                                      "example": 1,
                                      "default": 0
                                    }
                                  }
                                },
                                "InputStream": {
                                  "type": "object",
                                  "properties": {
                                    "Value": {
                                      "type": "string",
                                      "example": "Binary data"
                                    },
                                    "IsOptional": {
                                      "type": "boolean",
                                      "example": false,
                                      "default": true
                                    },
                                    "ValueCount": {
                                      "type": "integer",
                                      "example": 0,
                                      "default": 0
                                    }
                                  }
                                },
                                "FileName": {
                                  "type": "object",
                                  "properties": {
                                    "Value": {
                                      "type": "string",
                                      "example": "Mangovations.png"
                                    },
                                    "IsOptional": {
                                      "type": "boolean",
                                      "example": false,
                                      "default": true
                                    },
                                    "ValueCount": {
                                      "type": "integer",
                                      "example": 1,
                                      "default": 0
                                    }
                                  }
                                },
                                "UploadMode": {
                                  "type": "object",
                                  "properties": {
                                    "Value": {
                                      "type": "string",
                                      "example": "ProcessInLine"
                                    },
                                    "IsOptional": {
                                      "type": "boolean",
                                      "example": false,
                                      "default": true
                                    },
                                    "ValueCount": {
                                      "type": "integer",
                                      "example": 1,
                                      "default": 0
                                    }
                                  }
                                },
                                "IgnoreCheckContainer": {
                                  "type": "object",
                                  "properties": {
                                    "Value": {
                                      "type": "string",
                                      "example": "false"
                                    },
                                    "IsOptional": {
                                      "type": "boolean",
                                      "example": true,
                                      "default": true
                                    },
                                    "ValueCount": {
                                      "type": "integer",
                                      "example": 1,
                                      "default": 0
                                    }
                                  }
                                },
                                "Metadata": {
                                  "type": "object",
                                  "properties": {
                                    "Value": {
                                      "type": "string",
                                      "example": "{&quot;CoreField.Title&quot;:&quot;Mangovations logo&quot;, &quot;CoreField.Description&quot;: Approved logo for 2025&quot;}"
                                    },
                                    "IsOptional": {
                                      "type": "boolean",
                                      "example": true,
                                      "default": true
                                    },
                                    "ValueCount": {
                                      "type": "integer",
                                      "example": 1,
                                      "default": 0
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "Response": {
                          "type": "object",
                          "properties": {}
                        },
                        "ExecutionStatus": {
                          "type": "string",
                          "example": "Executed"
                        },
                        "HTTPCode": {
                          "type": "integer",
                          "example": 200,
                          "default": 0
                        },
                        "Code": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "SystemIdentifier": {
                          "type": "string",
                          "example": "ZZ1409J"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "text",
              "code": "curl -X 'POST' \\\n  'https://university1.orangelogic.com/api/UploadMedia/v3.0/UploadNewMedia?FolderRecordID=ZZ1282Z&FileName=Mangovations.png&UploadMode=ProcessInLine&IgnoreCheckContainer=false&Metadata=%7B%22CoreField.Title%22%3A%22Mangovations%20logo%22%2C%20%22CoreField.Description%22%3A%20Approved%20logo%20for%202025%22%7D&format=JSON' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: multipart/form-data' \\\n  -F 'InputStream=@Mangovations.png;type=image/png'"
            },
            {
              "language": "python",
              "code": "url = \"https://university1.orangelogic.com/api/UploadMedia/v3.0/UploadNewMedia\"\nheaders = {\n   \"Authorization\": \"Bearer 1234567890\",\n}\nparams = {\n   \"FolderRecordID\": \"ZZ1282Z\",\n   \"FileName\": \"Mangovations.png\",\n   \"UploadMode\": \"ProcessInLine\",\n   \"Format\": \"JSON\"\n   \"Custom_Metadata\":\"{\"CoreField.Title\":\"Mangovations logo\", \"CoreField.Description\":\"Approved logo for 2025\"}\"\n}\nfiles = {\"file\": ('Mangovations.png', open('Mangovations.png', 'rb'), 'image/png}')}\nprint(files)\nresponse = requests.post(url, headers=headers, params=params, files=files)\n\nprint(\"Status Code:\", response.status_code)\nprint(\"Response Text:\", response.text)"
            },
            {
              "language": "node",
              "code": "const fs = require('fs');\nconst FormData = require('form-data');\nconst axios = require('axios');\n\n//If you are testing a prototype, you can add the line below to deactivate strict ssl settings.\nprocess.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';\n\nasync function login() {\n  const username = encodeURIComponent('youremail');\n  const password = encodeURIComponent('yourpassword');\n  const loginUrl = `https://{OrangeLogicURL}/api/Authentication/v2.0/Login?Login=${username}&Password=${password}&IncludeUserEmail=false&format=JSON`;\n  const loginRes = await axios.post(loginUrl, {}, { withCredentials: true });\n  console.log('Login response:', loginRes.data);\n\n  const setCookie = loginRes.headers['set-cookie'];\n  let cookieHeader = '';\n  if (setCookie && setCookie.length > 0) {\n    cookieHeader = setCookie.map(cookie => cookie.split(';')[0]).join('; ');\n    console.log('Cookie header:', cookieHeader);\n  }\n\n  if (!(loginRes.data && loginRes.data.APIResponse.Response.Token)) {\n    throw new Error('Login failed');\n  }\n  const token = loginRes.data.APIResponse.Response.Token;\n\n  return { token, cookieHeader };\n}\n\nasync function uploadFile(token, cookieHeader) {\n  const form = new FormData();\n  form.append('InputStream', fs.createReadStream('{file to upload}'));\n  \n  // The folder's RecordID is different from its unique identifier.\n  const uploadUrl = '{OrangeLogicURL}/api/UploadMedia/v3.0/UploadNewMedia?FolderRecordID=2Y82VXOHT74&UploadMode=ProcessInLine&FileName=[filename of the file you are uploading]&format=JSON&IgnoreCheckContainer=false';\n\n  const headers = {\n    accept: 'application/json',\n    authorization: `Bearer ${token}`,\n    Cookie: cookieHeader,\n    ...form.getHeaders()\n  };\n\n  try {\n    const uploadRes = await axios.post(uploadUrl, form, { headers });\n    console.log('Upload response:', uploadRes.data);\n  } catch (e) {\n    if (e.response) {\n      console.log('Raw upload response:', e.response.data);\n    } else {\n      console.error(e);\n    }\n  }\n}\n\n(async () => {\n  try {\n    const { token, cookieHeader } = await login();\n    await uploadFile(token, cookieHeader);\n  } catch (err) {\n    console.error(err);\n  }\n})();"
            }
          ],
          "samples-languages": [
            "text",
            "python",
            "node"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```