Ich habe das LuaFileSystem doc angesehen und nicht wirklich verstanden, wie ich eine temporäre Datei erstellen und darin schreiben könnte. Ich weiß auch nicht genau, wo ich die temporäre Datei finde, die ich erstelle. In/tmp?Erstellen einer temporären Datei in lua
Hier ist, wie meine Funktion aussehen würde:
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