Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
West Wind Internet Client Tools
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Divers
Thread ID:
00856388
Message ID:
00856985
Vues:
54
You can use the code below I posted. That will allow you to post a file plus any other form variables to the server. Just make sure that whatever you read on the server is read as a multi-part form (depnds on teh tool you use).

Port 80 will likely not block anything unless theres a firewall that's configured to keep out very specific content. Not many of those around though except possibly to application servers of some sort.

+++ Rick ---



>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()   && Close the connection
>
>
>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 ---
>>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform