Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Getting File Type using Regular Expressions

by Belgarion (Chaplain)
on Apr 21, 2004 at 18:00 UTC ( #347075=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Getting File Type using Regular Expressions
in thread Getting File Type using Regular Expressions

The code:

$type = $query->uploadInfo($filename)->{'Content-Type'};
returns the Content-Type header the browser added to the upload. Basically, it's what the browser (or the user's computer) thinks this file is. It's not fool-proof however, and browsers are not required to include it.

See the CGI documentation for more information.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://347075]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2019-08-26 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?