diff options
-rw-r--r-- | src/luarocks/upload/multipart.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/upload/multipart.lua b/src/luarocks/upload/multipart.lua index 56ae873e..790e368f 100644 --- a/src/luarocks/upload/multipart.lua +++ b/src/luarocks/upload/multipart.lua | |||
@@ -70,7 +70,7 @@ function multipart.encode(params) | |||
70 | local buffer = { 'Content-Disposition: form-data; name="' .. k .. '"' } | 70 | local buffer = { 'Content-Disposition: form-data; name="' .. k .. '"' } |
71 | local content | 71 | local content |
72 | if type(v) == "table" and v.__class == File then | 72 | if type(v) == "table" and v.__class == File then |
73 | buffer[1] = buffer[1] .. ('; filename="' .. v.fname:gsub(".*/", "") .. '"') | 73 | buffer[1] = buffer[1] .. ('; filename="' .. v.fname:gsub(".*[/\\]", "") .. '"') |
74 | table.insert(buffer, "Content-type: " .. v:mime()) | 74 | table.insert(buffer, "Content-type: " .. v:mime()) |
75 | content = v:content() | 75 | content = v:content() |
76 | else | 76 | else |