Upload a File
To use the Stratus component in the Early Access mode, email us at support@zohocatalyst.com.
You can upload a file from your local system to an existing folder in the Catalyst File Store, by referring to its unique folder ID. You can upload an image, text document, CSV, or any type of file you need.
The maximum size of a file that you can upload is 100 MB. A unique file ID is created for the file after it is uploaded.
You can either use the component reference or the folder reference created earlier, to refer the folder where the file needs to be uploaded in. You must pass the unique folder ID of the folder. The response returned here will be the information of the uploaded file.
To know more about the component instance filestore_service used below, please refer to this help section.
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
file_name | String | A Mandatory parameter. Will hold the name of the file to be uploaded in FileStore. |
content_type | File | A Mandatory parameter. Will hold the the default value as "file". |
copy#Upload a file file = open('file.txt', "rb") filestore_service = app.filestore() folder = filestore_service.folder(6759000000166049) folder.upload_file('testFile.txt',file)
A sample response is shown below :
copy{ id: "5249000000016011", file_location: null, file_name: "testFile.txt", file_size: "84881", created_by: { zuid: "66466723", is_confirmed: false, email_id: "amelia.burrows@zylker.com", first_name: "Amelia", last_name: "Burrows", user_type: "Admin", user_id: "2136000000006003" }, created_time: "Aug 17, 2021 09:33 PM", modified_by: { zuid: "66466723", is_confirmed: false, email_id: "amelia.burrows@zylker.com", first_name: "Amelia", last_name: "Burrows", user_type: "Admin", user_id: "2136000000006003" }, modified_time: "Aug 17, 2021 09:33 PM", project_details: { project_name: "ShipmentTracking", id: "2136000000007733" }, folder_details: "5249000000016011" }
Last Updated 2025-06-20 19:01:24 +0530 +0530
Yes
No
Send your feedback to us