| so maybe I am doing something else wrong, but when I try to "PWS initializeAll" a little message pops up telling me my serverDirectory is incorrect... what is the format for this thing? I tired "F:\webserver" and "F:webserver:" and "F:webserver" ... its on my F drive and the directory is "webserver"... any clue why it won't start-up? Tysen |
| Yes, you do need the trailing slash. Barbara Ericson |
| Use the input html tag with the type being "file" to browse the local computer and select a file to upload. The file is uploaded as a Multipart MIME document in the http request. See http://www.htmlhelp.com/reference/html40/forms/input.html for information on using the input tag with the "file" type. See the MIMEDocument class for how to deal with a MIMEDocument. You can also look at the Commanche source code for how it handles uploads. Barbara Ericson |
| As Barbara mentioned above, in order to upload a file, it must be uploaded as a Multipart MIME document. This means that you must set the enctype of the form to "multipart/form-data". Unfortunately, PWS does not know how to parse POST requests that use a Content-Type of "multipart/form-data". Rather, it parses the POST request as if it always has a Content-Type (encoding) of type "application/x-www-form-urlencoded" (the default). So if you want to get to the data in a multipart form upload, you'll have to do something clever, like rewriting the parser by overriding PWS's decodeFields: method... Jim Gruen |
| You can file-out the code with the directory set correctly in ServerAction. Include some information when you upload your code to say what the server directory is and include any html files that you want in that directory or sub-directories. Barbara Ericson |