httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Taylor <>
Subject Re: mod_lua parsebody multipart form filename
Date Sun, 10 Jul 2016 18:28:02 GMT
I checked lua_request.c and the filename was being pulled out of the
Content-Disposition header, but not added to the lua table, so I added the
lines below at about 389, and it seems to work now (ie the result of
r:parsebody() returns the correct/expected value for the key 'filename'):

if (strlen(filename)) {
    req_aprtable2luatable_cb_len(L, "filename", filename, strlen(filename));

On Sat, Jul 9, 2016 at 10:26 PM, Mark Taylor <> wrote:

> Hi,
> I'm using mod_lua and doing file upload. Works fine, except I can't figure
> out how to get the filename. I tried getting the header directly but it
> doesn't seem to be in headers_in, ie this returns nil:
> r.headers_in['Content-Disposition']
> Content-Disposition: form-data; name="file_upload"; filename="a.txt"
> Seems like only name="" available from the parsebody()? Is there a way to
> get the filename for the uploaded file?
> Thanks,
> Mark

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message