The Upload File activity uses the Box UploadFile API to upload a file (File Path) into a specified folder (Parent Folder Id) under the existing or new file name (File Name).
After moving the file, the activity outputs a
BoxFile object (BoxFile) that includes the properties of the copied file and the
String identifier assigned to the file (File Id) both of which you can use in subsequent activities (e.g., Move File, Move File, etc.).
The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.
- Complete the Setup steps.
- Add the Box Scope activity to your project.
- Add an activity or run an external process that outputs a
File.Idvalue (e.g., Upload File, Search for Content, etc.).
- Add the Upload File activity inside the Box Scope activity.
- Enter values for the Input properties.
- Create and enter
BoxFilevariables for the Output property.
- Your input property values are sent in the UploadFile API operation request.
- The operation returns the
BoxFilevalues to your output property variables.
- ContinueOnError - Specifies if you want the activity to continue running when an error is thrown. This field supports only
- DisplayName - The display name of the activity. This field supports only
- File Path - The location of the file that you want to upload. This field supports only
- Parent Folder ID - The ID of the parent folder where you want to upload the file. This field supports only
- Enter a value of "0" to use the root folder of the application.
- To get the ID of a folder that is not the root, use the Search for Content activity.
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
- File Name - The name that you want to apply to the file. This field supports only
Stringvariables. If this property is left empty, the existing file name is applied.
- Upload Mode - The mode you want to use to upload your file. Select one of the three options from the drop-down list:
- Auto - the activity checks the size of the file and if the file is larger than 50 MB then it uses the chunked upload. If the file is less than 50 MB it uses direct upload (single).
- Single - the activity uploads the entire file regardless of size. If the file exceeds 50 MB then an error is thrown.
- Chunked - the activity uploads the file using the chunked upload. Use this option only if your file is larger than 20 MB.
- Box File - The
Box Fileobject that includes the file properties. Enter a
Box Filevariable. The
Box Fileobject includes multiple properties that you can use in other activities.
- File Id - The identifier assigned to the
BoxFileobject. This field supports only