Getting size parameter right for streams.

This commit is contained in:
mike12345567 2024-05-31 17:59:16 +01:00
parent 75501c2251
commit d90763dd3c
1 changed files with 4 additions and 1 deletions

View File

@ -368,13 +368,16 @@ export async function handleFileResponse(
size = parseInt(contentLength, 10)
}
await objectStore.streamUpload({
const details = await objectStore.streamUpload({
bucket,
filename: key,
stream,
ttl: 1,
type: response.headers["content-type"],
})
if (!size && details.ContentLength) {
size = details.ContentLength
}
}
presignedUrl = objectStore.getPresignedUrl(bucket, key)
return {