I've looked the LuaFileSystem doc and didn't really understood how I could create a temporary file and write in it. Also, I'm not sure exactly where I can find the temp file I create.. In /tmp?
Here's how my function would look like:
do
function upload_file(web)
f = -- creates a temporary file
f:write(file.contents) -- writes the content of the file uploaded in the temp file
f:seek("set", 0) -- we go back at the beginning
s = f:read("*a") -- read it out
print (s) -- print it out
f:close() -- close it
end
end