Upload Object¶
The upload object in VOR Stream consists of the following data:
Data | Description | Data Type |
---|---|---|
Name | Name of upload | String |
Type Code | Type of upload | String |
Description | Description of upload | String |
Binary File | The binary file of the upload | Structure |
Approved | If the upload was approved | Boolean |
Version | Version of upload | Integer |
To retrieve the upload data, pass the upload's unique numeric identifier to the GetUpload function in Golang or the get_upload function in Python.
Get Upload Object, Golang Example¶
uploadDetails, err := sdkClient.GetUpload(UploadId)
if err != nil {
log.Fatal(err)
}
Get Upload Object, Python Example¶
from sdk import upload
myupload = upload.get_upload(upload_id)
#Write the upload to an output folder
upload_dir = "/opt/vor/data/playpen/output/test
f = open(upload_dir + myupload.Name, "wb")
f.write(myupload.BinaryFile)
f.close()