Hi again to the community, i have a problem, i bought a domain for http operations, i achieved to download files from the server easely, but i am struggling so much trying to upload a file....
I achieved to make the most of the process, it seems to connect and to do everything more or less, (the size should be 1KB), and there's data missing, and the file is not there on the server afterwards. (See screenshot)
Thanks!
Here is my code:
http = CreateHTTPConnection()
host = SetHTTPHost( http, "myhost", 0 )
SendHTTPRequestASync(http, "uploadfile.php")
repeat
ready = GetHTTPResponseReady( http )
print(ready)
sync()
until ready = 1
sync()
sync2 = SendHTTPRequestASync(http, "uploadfile.php")
if sync2 = 1
SendHTTPFile(http , "uploadfile.php" , "" , "test.txt")
sync()
repeat
response$ = (GetHTTPResponse( http ))
progress = ( GetHTTPFileProgress( http ))
complete = GetHTTPFileComplete(http)
print("WAITING")
Sync()
until complete = 1
endif
sync()
CloseHTTPConnection(http)
DeleteHTTPConnection(http)
sync()
do
print("Complete:")
print (complete)
print("Progress:")
print(progress)
print("Response:")
print(response$)
Sync()
loop