Appearance
UpsertFileInput
Type: Input
Input for creating or updating an external-backed file. Cloud-backed files go through requestFileUploads / completeFileUploads.
Fields
| Name | Type | Default | Description |
|---|---|---|---|
| category | FileCategory! | File category (required) | |
| checksum | String | File checksum | |
| componentId | ComponentID | Associated component ID | |
| estimateId | EstimateID | Associated estimate ID | |
| externalStorageKey | String | Storage key for external-backed files. Required on create; cannot be set on cloud-backed files. | |
| id | FileID | ID for update; omit for create | |
| invoiceId | InvoiceID | Associated invoice ID | |
| jobId | JobID | Associated job ID | |
| mimeType | String! | MIME type (required) | |
| name | String! | Display name (required) | |
| orderId | OrderID | Associated order ID | |
| originalFilename | String! | Original filename (required) | |
| parentFileId | FileID | Parent file ID for versioned files | |
| processingMetadata | JSONMap | Processing metadata (JSON) | |
| purchaseOrderId | PurchaseOrderID | Associated purchase order ID | |
| sizeBytes | Int! | File size in bytes (required) | |
| status | FileStatus | Processing status (defaults to ready for external creates) | |
| uploadedByUserId | UserID | ID of the user uploading the file | |
| usageRole | ComponentFileUsageRole | Usage role when attached to a component | |
| versionNumber | Int | Version number (defaults to 1) |