Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send file to server via XMLHTTP
Message
De
01/02/2009 11:01:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Send file to server via XMLHTTP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01378672
Message ID:
01378672
Vues:
69
Hi All, again,

Something new has come up.

I am attempting to send a binary file to a web server (mine now) using the XmlHttp object. I can get the Fox code
to work fine (I think), but I am a little lost as to how I receive and write the file on the web server end. Here is the
code I am using to send the file. I am looking for some ASP 3.0 code to receive it.

(the code is reduce for clarity.)
lcSource = "C:\Temp\Dummy.dbf"
lcDestination = "http:\\www.GLRsoftware.com\FoxSafe\send.asp?file=Dummy.dbf"

oHttp = CREATEOBJECT("MSxml2.XMLHTTP")

*-- Send file

IF EMPTY(m.tcUser)
	oHttp.OPEN("GET", tcDestination, .F.)
ELSE
	oHttp.OPEN("GET", tcDestination, .F., m.tcUser, m.tcPassword)
ENDIF

oHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')

lcFile = FILETOSTR(tcSource)

oHttp.SEND( m.lcFile )

? oHttp.Status, ohttp.StatusText
What should be in the Send.asp to grab the Dummy.dbf sent from the client?
Greg Reichert
Répondre
Fil
Voir

Click here to load this message in the networking platform