mirror of
https://github.com/zedeus/nitter.git
synced 2024-10-31 22:08:50 +00:00
Actually close files after uploading
This commit is contained in:
parent
6a058a8c5c
commit
afdbb6ad9e
1 changed files with 4 additions and 3 deletions
|
@ -59,7 +59,7 @@ settings:
|
|||
|
||||
routes:
|
||||
get "/":
|
||||
resp renderMain(renderSearch(), title=cfg.title, titleText="Search")
|
||||
resp renderMain(renderSearch(), title=cfg.title)
|
||||
|
||||
post "/search":
|
||||
if @"query".len == 0:
|
||||
|
@ -117,9 +117,10 @@ routes:
|
|||
resp Http404
|
||||
|
||||
let file = openAsync(filename)
|
||||
defer: file.close()
|
||||
let buf = await readAll(file)
|
||||
file.close()
|
||||
|
||||
resp await readAll(file), mimetype(filename)
|
||||
resp buf, mimetype(filename)
|
||||
|
||||
get "/video/@sig/@url":
|
||||
cond "http" in @"url"
|
||||
|
|
Loading…
Reference in a new issue