fix upload file extract issue, add more test (#17)
* fix upload file extract issue, add more test * uncomment test
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
--local str = "form-data; name=\"files[]\"; filename=\"Song-of-joy.png\""
|
||||
--local ext = ngx.re.match(str, [[filename=".*\.(\w+)"]], "jo")
|
||||
--print(ext)
|
||||
|
||||
local str = [[image\/png]]
|
||||
local ext = ngx.re.match(str, [[image\/(\w+)]])
|
||||
print(ext)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user