Upload an image to a folder
reference_folder
is an item of type Group
created on the previous example.
media = reference_folder.item.append(type='Media', path=r"/mnt/project/image.jpg")
Don't forget to replace the path with the actual path of the file you want to upload.
Upload a file on Aquarium and update an existing media
file_metadata = aq.upload(path=r"/mnt/project/image.jpg")
media = aq.media("1234").update_data(file_metadata)
anothermedia = aq.media("5678").update_data(file_metadata)
All uploaded files on Aquarium generate metadata, that can be used on multiple other items to avoid uploading the same file mulitple times.
Upload a file on a Shot or Asset
media = aq.shot("1234").upload_on_task(
task_name='animation',
version_name='v001',
override_media=True,
path=r"/mnt/project/image.jpg")
This function will automatically create a new version on the task if it doesn't exist yet. The override_media
parameter will replace the existing media that has the same file path name. When replacing an existing media, the old data is not deleted, a new history update is created instead.
Create a folder
Previous
Get folders
Next