Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Msxmlhttp sending image data
Message
De
16/07/2014 10:19:06
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
16/07/2014 09:36:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01603736
Message ID:
01603801
Vues:
58
>Mike, most of VB6 examples can be translated to VFP, in this case in the examples shown, ADODB and MSXML are used, and both can be used in VFP too.
>
>Then, in the first of the links referenced, the example 2 uses again XMLHTTP:
>
>See at point: "2. http request object"
>http://www.motobit.com/tips/detpg_post-binary-data-url/
>
>I think that using the first example, the second and the comments about the parameters order, you can get it.
>
>Best regards.-

This looks almost exactly like I imagine it would be done:
Set xmlhttp = CreateObject("Msxml2.XMLHTTP.4.0")
UserName = ""
Password = ""
adoStream.Position = 0
xmlhttp.Open "POST", "http://twitpic.com/api/uploadAndPost?username=" + UserName + "&password=" + Password + "&media=", False
xmlhttp.setRequestHeader "Content-Length", adoStream.Size
xmlhttp.setRequestHeader "Content-Type", "content=multipart/form-data"
xmlhttp.send adoStream.Read(adoStream.Size)

except that adoStream is doing what - FileToStr()?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform