UploadFile
Uploads a File.
Input
Name | Type | Accepts Input Streams | Description |
FilePath | String | False | The path of the file including the name. Takes precedence over Content. |
ParentId | String | False | Parent folder the file is being uploaded into. If not specified, the file will be uploaded to the root of the Box account.
The default value is 0. |
AsUserId | String | False | The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Content | String | True | The content as an InputStream to be uploaded when FilePath is not specified. |
FileName | String | False | The name of the file to upload including extension, required if Content is specified. It replaces the name of the file if FilePath is also specified. |
CreatedAt | Datetime | False | Defines the time the file was originally created at. If not set, the upload time will be used. As an example, '2020-01-01T12:00:00-05:00'. |
ModifiedAt | Datetime | False | Defines the time the file was last modified at. If not set, the upload time will be used. As an example, '2020-01-01T12:00:00-05:00'. |
Hash | String | False | An optional input containing the SHA1 hash of the file to ensure that the file was not corrupted in transit. |
Result Set Columns
Name | Type | Description |
Success | String | Whether or not the file was successfully uploaded. |
ID | String | Id of the created file. |
VersionID | String | Id of a specific version of the file. |
Hash | String | The SHA1 hash of the file. |
Etag | String | Many of the file system items (files or folders) that can be requested via the API return an etag value for the item. |