3f98d5825d
* fix upload file extract issue, add more test * uncomment test
11 lines
241 B
Lua
11 lines
241 B
Lua
--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)
|
|
|
|
|
|
|