Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Msxmlhttp sending image data
Message
From
16/07/2014 10:19:06
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
16/07/2014 09:36:23
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01603736
Message ID:
01603801
Views:
56
>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()?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform