fix: persist multipart job id for resume
This commit is contained in:
parent
b7118a7859
commit
b7d66da14b
1 changed files with 3 additions and 1 deletions
|
|
@ -201,12 +201,14 @@ export async function uploadFileMultipart(
|
|||
key = saved.key
|
||||
uploadId = saved.uploadId
|
||||
} else {
|
||||
const { data } = await api.post<{ key: string; uploadId: string }>(
|
||||
const { data } = await api.post<{ key: string; uploadId: string; jobId?: string }>(
|
||||
`/projects/${projectId}/uploads/multipart`,
|
||||
{ fileName: file.name, contentType: file.type || 'application/octet-stream' }
|
||||
)
|
||||
key = data.key
|
||||
uploadId = data.uploadId
|
||||
await saveUpload({ id: storeId, projectId, jobId: data.jobId ?? '', files: [file],
|
||||
createdAt: Date.now(), kind: 'zip', r2Key: key })
|
||||
}
|
||||
const persist = () => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue