I’m trying to upload files to a web page:
[lua]local path = system.pathForFile( filename, system.DocumentsDirectory )
local fh = io.open(path)
local len = fh:seek( “end”, 0 )
io.close(fh)
print(“len=” … len)
response_body = {}
http.request{
url = url … "media.aspx,
method = “POST”,
headers = {
[“Content-Type”] = “multipart/form-data”,
[“Content-Length”] = len
},
source = ltn12.source.file(io.open(path)),
sink = ltn12.sink.table(response_body)
}[/lua]
It is not working… Anyone have any suggestions on how to get it to work? Thanks! [import]uid: 4899 topic_id: 8057 reply_id: 308057[/import]