What are the file types you can upload via PHP? -


i'm trying find reference shows different names of "types" $_files["file"]["type"] == "image/gif" i'm looking csv, ms excel, mac numbers, ms word, etc.

i can't find on php.net or google. i'm calling wrong thing anyway.

what called should looking for?

this explained in php manual.

from http://php.net/manual/en/features.file-upload.post-method.php (emphasis mine)

$_files['userfile']['type']: mime type of file, if browser provided information. example "image/gif". mime type not checked on php side , therefore don't take value granted.

so term looking mime type. putting google make end @ wikipedia's https://en.wikipedia.org/wiki/internet_media_type

an internet media type[1] two-part identifier file formats on internet. identifiers defined in rfc 2046 use in email sent through smtp, use has expanded other protocols such http, rtp , sip. these types called mime types, , referred content-types, after name of header in several protocols value such type.

the article states

iana manages official registry of media types

following link lead

and contains list looking for. note looking @ list pointless unless want find out official mimetype particular file format is.

on side note: if want validate/detect mime type of file, check code have provided in


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -