Dynamic Web TWAIN provides many methods for uploading images to the server through post. Sometimes you might want to send more information to the server together with the image data. In this case, you can use the method SetHTTPFormField which was added in version 5.0 of Dynamic Web TWAIN.
To use this method, you should first clear all pre-defined form fields with the method ClearAllHTTPFormField. Also, please use SetHTTPFormField before you use any of the HTTPUpload***ThroughPost*** methods.
DWObject.ClearAllHTTPFormField(); DWObject.SetHTTPFormField("PDFFileName", "test.pdf"); //Get action page path var CurrentPathName = unescape(location.pathname); var CurrentPath = CurrentPathName.substring(0, CurrentPathName.lastIndexOf("/") + 1); var strActionPage = CurrentPath + "SaveToFile.aspx"; DWObject.HTTPUploadAllThroughPostAsMultiPageTIFF( "www.dynamsoft.com", strActionPage, "test.tiff" );
In the action page, you can access the uploaded fields with their names. For example, in C#, you can access it like this: