Hello,
I need to upload a file and it’s not working. I know the file is there and exists so that’s not the problem. I have tried it two ways.
First, this code for a html page works for uploading. I tested it.
\<form method="post" action="http://xx.xx.xx.xx:8080/webpage.htm?dd=325443" name="submit" enctype="multipart/form-data"\> \<input type="file" name="fileField"\>\<br /\>\<br /\> \<input type="submit" name="submit" value="Submit"\> \</form\>
So in Corona I tried this:
URL3 = "http://" .. storyboard.IP7 .. ":" .. storyboard.Port7 .. "/" .. storyboard.WebFile7 .. ".htm" local File2 = "testfile.3gp" local path = system.pathForFile( "testfile.3gp", system.DocumentsDirectory ) response\_body = {} local body, code, headers = http.request{ url = URL3, method = "POST", headers = { ["Content-Type"] = "multipart/form-data" }, source = path }
I tried with the network.upload and not sure if i had it right. Can someone show me how to upload a single file? I have read many postings and tried them and nothing yet.
Thanks!