Re: Request for information - WeOnlyDo Discussion board

Re: Request for information (General questions)

by wodDamir, Thursday, October 09, 2008, 09:23 (5679 days ago) @ Ludo

Ludo,

For downloading, all you need to do is set Filenane property of response object to point to some file on hard-drive:

[code]wodHttp1.Response.Filename = C:weonlydo.jpg
wodHttp1.Get http://www.weonlydo.com/Images/weonlydo.gif [/code]

The above code will download the image to C: .

As for upload, I assume you mean form-based upload. For that, you can use something like this:

[code]wodHttp1.URL = http://www.weonlydo.com/HttpDLX/Demo/TestFormUpload.asp

wodHttp1.Request.FormUpload.Add Name , Text2.Text
wodHttp1.Request.FormUpload.AddFile TheFile , Text1.Text
wodHttp1.Post[/code]

In this code snippet, first parameter of .Add methods are Names of intpu fields, while second parameter is value that is sent (just as if you would type them in browser.

You can even see this form on the following URL: http://www.weonlydo.com/HttpDLX/Demo/TestFormUpload.htm

Hope this helps.

Regards,
Damba


Complete thread: