fix: admin/monitor: sometimes file download progress was not displayed
Massimo Melina committed
Jul 10, 2023 at 17:08 UTC
410ce029bd906dadacf5ff66b5491be63f793a69
2 files changed
+10
-9
shared/dialogs.ts
+9
-9
@@ -55,16 +55,16 @@ function Dialog(d:DialogOptions) {
55
},
56
d.noFrame ? h(d.Content || 'div')
57
: h('div', {
58
- className: 'dialog',
59
- style: {
60
- ...position(),
61
- ...d.dialogProps?.style,
62
- },
63
- onClick(ev:any){
64
- ev.stopPropagation()
65
- },
66
- ...d.dialogProps,
58
+ className: 'dialog',
59
+ style: {
60
+ ...position(),
61
+ ...d.dialogProps?.style,
62
},
63
+ onClick(ev:any){
64
+ ev.stopPropagation()
65
+ },
66
+ ...d.dialogProps,
67
+ },
68
d.closable || d.closable===undefined
69
&& h('button', {
70
className: 'dialog-icon dialog-closer',
src/serveFile.ts
+1
@@ -79,6 +79,7 @@ export async function serveFile(ctx: Koa.Context, source:string, mime?:string, c
79
ctx.body = createReadStream(source, range)
80
if (ctx.vfsNode)
81
updateConnection(ctx.state.connection, {
82
+ ctx, // this will cause 'path' to be sent as well
83
op: 'download',
84
opTotal: stats.size,
85
opOffset: range && (range.start / size),