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
|
key = saved.key
|
||||||
uploadId = saved.uploadId
|
uploadId = saved.uploadId
|
||||||
} else {
|
} 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`,
|
`/projects/${projectId}/uploads/multipart`,
|
||||||
{ fileName: file.name, contentType: file.type || 'application/octet-stream' }
|
{ fileName: file.name, contentType: file.type || 'application/octet-stream' }
|
||||||
)
|
)
|
||||||
key = data.key
|
key = data.key
|
||||||
uploadId = data.uploadId
|
uploadId = data.uploadId
|
||||||
|
await saveUpload({ id: storeId, projectId, jobId: data.jobId ?? '', files: [file],
|
||||||
|
createdAt: Date.now(), kind: 'zip', r2Key: key })
|
||||||
}
|
}
|
||||||
const persist = () => {
|
const persist = () => {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue