fix(upload): always send workflow_uuid
/upload requires it and it is fixed for this app, but the client only appended it when ctx happened to carry it — and FileField passes only activity, field and instance. Every upload came back 400 with "Missing required params: workflow_uuid". Taken from config now, so it cannot be forgotten by a caller. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6df594f0b4
commit
43259b378c
@ -179,7 +179,11 @@ export class ZinoClient {
|
||||
async uploadFile(file, ctx) {
|
||||
const form = new FormData()
|
||||
form.append('file', file)
|
||||
if (ctx.workflowUuid) form.append('workflow_uuid', ctx.workflowUuid)
|
||||
// workflow_uuid is REQUIRED and is fixed for this app, so it is taken from
|
||||
// config rather than from ctx. Passing it optionally is how the first
|
||||
// version shipped: the upload sent activity_id, field_id and instance_id
|
||||
// and got back `Missing required params: workflow_uuid`.
|
||||
form.append('workflow_uuid', WORKFLOW)
|
||||
if (ctx.activityId) form.append('activity_id', ctx.activityId)
|
||||
if (ctx.fieldId) form.append('field_id', ctx.fieldId)
|
||||
if (ctx.instanceId) form.append('instance_id', String(ctx.instanceId))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user