From cc05faaf377927e8d876f15edec813be002e80d6 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 1 Nov 2024 17:01:34 +0100 Subject: [PATCH] Add default Content-Disposition header for download --- codex/rest/api.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codex/rest/api.nim b/codex/rest/api.nim index 597e7386..b799bec6 100644 --- a/codex/rest/api.nim +++ b/codex/rest/api.nim @@ -102,7 +102,8 @@ proc retrieveCid( if manifest.filename.isSome: resp.setHeader("Content-Disposition", "attachment; filename=\"" & manifest.filename.get() & "\"") - + else: + resp.setHeader("Content-Disposition", "attachment") await resp.prepareChunked()