Fix white page on cached empty files

This commit is contained in:
Zed 2019-10-21 07:59:36 +02:00
parent a78eea9dce
commit ea4a8cab2f
1 changed files with 3 additions and 2 deletions

View File

@ -29,8 +29,9 @@ proc createMediaRouter*(cfg: Config) =
try:
await client.downloadFile($uri, filename)
client.close()
except:
discard
except HttpRequestError:
removeFile(filename)
resp Http404
sendFile(filename)