Upload files via SDK

We need to upload images and text files from our devices to the tago file system, so they can be displayed and downloaded from dashboards. Is there a way to do this using the python SDK?

Hi @graemerae,

The Python SDK did not support upload files yet but it supports uploadfilesbase64. You can use SDK in javascript that upload files, the link that how to use SDK in js is here: Files | TagoIO SDK for JavaScript and TypeScript. If you want to use uploadfilebase64 in python, try this code:

from tago import Account

my_account = Account("Token here")

result = my_account.files.uploadBase64([
  {
    "filename": "/requirements.txt",
    "file": "StringWithBase64"
  }
])

Regards, Rafael Teles.

1 Like