-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 André,
On 4/7/2009 4:49 PM, André Warnier wrote: > Ok Mark, I don't pretend I know how it works in Tomcat. > How does one upload a file then ? That depends on how you /want/ to upload it. If you want to use the standard HTML form-based file upload, you'll have to use multipart/form-data (since that's what the HTML spec says to do). PUT is, as stated, also an option. The only real difference is the meaning of the target URI. > I mean other than with a PUT, as I presume that the OP doesn't just want > to write files arbitrarily in his URI space on the server) If your server is expecting a single file for upload, then there is no need to go through the whole multipart/form-data thing. You can just use the Content-Type header to indicate that the file is application/x-msword or whatever and jam the file into the request body. multipart/form-data is only useful if you want both discrete data (like form parameters) plus something huge, like the contents of a file. It's just like an email message: there's no reason to use a multipart MIME message when there's only one part to transmit. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbwg0ACgkQ9CaO5/Lv0PB9vACcC/UIPdCE9DwQglm78OORn+Eu kJYAoL59rNOTErwLU2iK6aHm0YOY8XVF =ZL/Y -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org