lua-resty-multipart-parser
lua-resty-multipart-parser copied to clipboard
Binary files do not work
When I try to upload binary file (jpg), I get error:
failed to parse part: resty/multipart/parser.lua:58: bad argument #1 to 'find' (string expected, got nil).
When I try upload txt file, everything is ok.
+1
Try the latest OpenResty 1.15.8.2 version?
Try setting client_body_buffer_size to some value greater than the size of your jpg file. It seems that ngx.req.get_body_data() cannot receive data beyond client_body_buffer_size. That's how I fixed the same error. @vsguts
Perhaps that's one thing @agentzh meant in his TODO section: Better error reporting. :)