luci-base: ensure that file upload values have length
[project/luci.git] / modules / luci-base / luasrc / http.lua
index 56d0064..be5577e 100644 (file)
@@ -359,6 +359,7 @@ function mimedecode_message_body(src, msg, file_cb)
                        then
                                field.name = lhttp.header_attribute(buffer, "name")
                                field.file = lhttp.header_attribute(buffer, "filename")
+                               field[1] = field.file
                        end
 
                        if field.headers then