Answer the question
In order to leave comments, you need to log in
How can I submit a file to nginx?
I'm trying to send a file, via nginx:
ngx.req.set_header("Content-Disposition", "attachment; filename=qwe.txt")
ngx.say('{"code":"101","message":"empty token"}')
Answer the question
In order to leave comments, you need to log in
ngx.req.set_header changes the request header, which is pretty pointless.
You need https://github.com/openresty/lua-nginx-module#ngxh...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question