mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-23 03:15:40 +00:00
Make image upload resilient to crashes
This commit is contained in:
parent
2f51de90d0
commit
12cf772616
|
@ -70,7 +70,12 @@ routes:
|
|||
await client.downloadFile($uri, filename)
|
||||
client.close()
|
||||
|
||||
sendFile(filename)
|
||||
if not existsFile(filename):
|
||||
resp Http404
|
||||
|
||||
let file = openAsync(filename)
|
||||
defer: file.close()
|
||||
resp await readAll(file), mimetype(filename)
|
||||
|
||||
get "/video/@sig/@url":
|
||||
cond "http" in @"url"
|
||||
|
|
Loading…
Reference in a new issue