Doel
Upload a tenant-scoped file from an Element into the configured GCS file artifact/output bucket.
Elements runtime reference / Tenant GCS files
uploadGcsFileUpload a tenant-scoped file from an Element into the configured GCS file artifact/output bucket.
uploadGcsFile(path, content=None, data=None, dataBase64=None, rows=None, format=None, bucket=None, prefix=None, contentType=None, encoding=None, overwrite=False, metadata=None, signedUrl=False, ttlSeconds=None, method=None)
Upload a tenant-scoped file from an Element into the configured GCS file artifact/output bucket.
upload_gcs_filegcs.uploadgcs.upload_fileUse these fields as the Python call arguments or keyword payload for this helper.
{
"path": "exports/report.json",
"data": {
"status": "ready"
},
"format": "json",
"overwrite": true,
"signedUrl": true,
"ttlSeconds": 900
}
| Field | Description |
|---|---|
path | Relative file path under the current tenant filestore folder, or a gs:// URI already inside that folder. |
content/data/dataBase64/rows | Payload to upload. Rows can be serialized as json, ndjson, csv, or parquet using format. |
format | Optional output format. Inferred from path when omitted. |
bucket | Optional bucket override; must match the worker configured file artifact/output bucket. |
prefix | Optional extra prefix under filestore/{tenantId}/. |
overwrite | When false, upload fails if the object exists. |
metadata | Optional object metadata. Values are stringified by the worker. |
signedUrl/ttlSeconds/method | When signedUrl is true, include a short-lived signed URL in the response. |
{
"uri": "gs://dashview-cache/filestore/tenant/exports/report.json",
"gcsUri": "gs://dashview-cache/filestore/tenant/exports/report.json",
"relativePath": "exports/report.json",
"contentType": "application/json",
"size": 18,
"signedUrl": "https://storage.googleapis.com/...",
"expiresAt": "2026-07-06T12:15:00Z"
}
def run():
ref = gcs.upload(
"exports/report.json",
data={"status": "ready"},
format="json",
overwrite=True,
signedUrl=True,
)
return {"gcsUri": ref["gcsUri"], "downloadUrl": ref["signedUrl"]}