From fad6f8b6c1f0d551a733160c417a253616b71f5d Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 30 Sep 2024 11:13:49 -0500 Subject: attatchments --- docs/net.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/net.md') diff --git a/docs/net.md b/docs/net.md index 0807c72..9c841b3 100644 --- a/docs/net.md +++ b/docs/net.md @@ -158,6 +158,14 @@ res.header["test"] = "wowa" res.header["Content-Type"] is set automatically depending on the file extention, using /etc/mime.types, or whatever option was supplied to listen (see listen options) +option table + +|key|value|effect| +|--|--|--| +|attatchment|boolean, default false|whether or not to add Content-Disposition (if file will be downloaded)| +|filename|string, defualts as the first argument|what the client should see as a filename (only when attatchment is true)| + + ```lua ... res:sendfile("./html/index.html") -- cgit v1.2.3