Trying to upload a file with applet using HttpClient:
By looking at Class *
org.apache.commons.httpclient.methods.multipart.FilePart and *its
Constructors such as
*FilePart<http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/multipart/FilePart.html#FilePart%28java.lang.String,%20java.io.File,%20java.lang.String,%20java.lang.String%29>
*(String <http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html> name,
File <http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html> file,
String <http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html>
contentType,
String <http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html>
charset),
looks like I have define the content-type beforehand....
Is there a way I can detect the content-type of the file I am trying to
upload with some external libraries (besides using some sort of extension
map that maps extensions to the mime-type)?

Reply via email to