works (now), lol
This commit is contained in:
@@ -49,7 +49,7 @@ pub fn (app &App) root(mut ctx Context, path string) veb.Result {
|
|||||||
|
|
||||||
ctx.res.header.add(.content_type, 'application/octet-stream')
|
ctx.res.header.add(.content_type, 'application/octet-stream')
|
||||||
ctx.res.header.add(.content_disposition, 'attachment; filename="${os.base(abs_path)}"')
|
ctx.res.header.add(.content_disposition, 'attachment; filename="${os.base(abs_path)}"')
|
||||||
return ctx.file(abs_path)
|
return ctx.text(content)
|
||||||
}
|
}
|
||||||
|
|
||||||
entries := util.Utility.list_files(abs_path, abs_root) or { return ctx.not_found() }
|
entries := util.Utility.list_files(abs_path, abs_root) or { return ctx.not_found() }
|
||||||
|
|||||||
Reference in New Issue
Block a user