I’m trying to get the MIME type of an <input type="file" /> element using Perl, but without actually examining the contents of the file itself, In other words, just using the HTTP headers.
I have only been able to get the “multipart/form-type” Content-Type value, but my understanding is that each element will get its own MIME Type?
How can I see the sub-MIME types using Perl?
I assume that you are using CGI.pm to do this. If you are using the OO interface to CGI you can do something like this.
If you are using the procedural interface, the equivalent would be: