Where is this failing and what is the error?
You may not have rights to write the file into that folder...
this works for me:
DO wwHttp loHttp = CREATEOBJECT("wwHttp") loHttp.nHttpPostMode = 2 loHttp.AddPostKey("MyFile","c:\sailbig.jpg",.T.) lcHtml = loHttp.HttpGet("http://localhost/wconnect/UploadTest.aspx") ? lcHtml
To this ASPX.cs page:
using
using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;publicpartialclass UploadTest : System.Web.UI.Page {protectedvoid Page_Load(object sender, EventArgs e) { Response.Write(Request.Files.Count);foreach (string file in Request.Files.AllKeys) { HttpPostedFile upload = Request.Files[file]; Response.Write(" Length: " + upload.ContentLength.ToString()); Response.Write(" FileName: " + upload.FileName); }foreach (string formKey in Request.Form.AllKeys) { Response.Write(formKey + ": " + Request.Form[formKey] + "<hr/>"); } Response.End(); } }
This spits out 1 file and the filename.
+++ Rick ---