dont stream data when client is gone
This commit is contained in:
parent
a47d18d290
commit
9b48794fcf
1 changed files with 1 additions and 0 deletions
|
@ -17,6 +17,7 @@ export const GET = async ({ params, locals }) => {
|
||||||
const metadata = await minio.statObject(BUCKET, `${file.uploader.id}/${file.internalName}`);
|
const metadata = await minio.statObject(BUCKET, `${file.uploader.id}/${file.internalName}`);
|
||||||
|
|
||||||
const ac = new AbortController();
|
const ac = new AbortController();
|
||||||
|
ac.signal.onabort = () => object.destroy;
|
||||||
|
|
||||||
const stream = new ReadableStream({
|
const stream = new ReadableStream({
|
||||||
start(controller) {
|
start(controller) {
|
||||||
|
|
Loading…
Reference in a new issue