Merge branch 'develop' into 'develop'
Thumbnail Serving Hotfix Closes #10618 See merge request firefish/firefish!10574
This commit is contained in:
commit
e25e2ecb68
1 changed files with 0 additions and 2 deletions
|
@ -167,7 +167,6 @@ export default async function (ctx: Koa.Context) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.length = file.size;
|
|
||||||
ctx.set("Content-Disposition", contentDisposition("inline", filename));
|
ctx.set("Content-Disposition", contentDisposition("inline", filename));
|
||||||
ctx.set("Content-Type", contentType);
|
ctx.set("Content-Type", contentType);
|
||||||
|
|
||||||
|
@ -192,7 +191,6 @@ export default async function (ctx: Koa.Context) {
|
||||||
ctx.set("Accept-Ranges", "bytes");
|
ctx.set("Accept-Ranges", "bytes");
|
||||||
} else {
|
} else {
|
||||||
ctx.status = 206;
|
ctx.status = 206;
|
||||||
ctx.length = readable.size;
|
|
||||||
readable.on("close", async () => {
|
readable.on("close", async () => {
|
||||||
await fileHandle.close();
|
await fileHandle.close();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue