fix upload file extract issue, add more test (#17)

* fix upload file extract issue, add more test

* uncomment test
This commit is contained in:
木逸辰
2021-09-09 11:13:07 +08:00
committed by GitHub
parent 3d2e03be82
commit 3f98d5825d
3 changed files with 22 additions and 15 deletions
+10
View File
@@ -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)