Hi Rick,
Yes this is a VFP app.
What I am attempting to do is send a file to the server.
The way it works now is I scan a table then create a connection using your classes and send the information that way.
Like this...
oInternet.HTTPConnect("www.MySite.com")
oInternet.AddPostKey("Value1", "This Value One")
oInternet.AddPostKey("Value2", "This Value Two")
lnResult =oInternet.HTTPGetEx("/GetValues.cfm",@lcText,@lnText)
oInternet.HTTPClose()
What I need to do is send a file attachment with that information.
The idea was to send the To and From eMail addresses along with a message and attachement or two to our servers and then let our servers send it out.
The routers at some of the companies seem to block every idea so I thought I could encode the file and send it like I send everything else but I think the URL that will be built will be to large to send it in a link. Some files and be 500+k in size.
I noticed that some web pages in eMail programs allow you to attach file and upload them so my thought was maybe I could do something like that.
Do you have a better solution or a way to send this file via port 80 that the routers and packet sniffers will not stop it from going through?
Sorry if I am not clear I am real new to this web programming and so far your classes have made it a snap.
Thanks,
Ron
>Is this from a VFP app?
>
>Yes you can upload files with the wwHTTP class. It takes only a few lines of code:
>
>
>oHTTP = CREATEOBJECT("wwHTTP")
>
>*** Set mode to multi-part form
>oHTTP.nHttpPostMode = 2
>
>*** Post a file and a regular form variable
>oHttp.AddPostKey("File","d:\temp\wws_invoice.pdf",.T.)
>oHttp.AddPostKey("txtFileNotes","test note")
>
>lcHTML = oHTTP.HTTPGet("http://localhost/wconnect/FileUpload.wwd")
>
>*** Display result from server
>ShowHTML(lcHTML)
>
>
>This code is equivalent to posting a multi-part form with a file upload button in the Web browser.
>
>+++ Rick ---
>