trouble uploading a mht file

See all posts See thread Reply

Re: trouble uploading a mht file new!
by colin, 15 years, 8 months ago
No, you cannot do what you did, as file_src_pathname is set after allowed is read.

For security reason, MIME types are limited to what you allow only. So you have an array of allowed MIME types in allowed, and you can add some as you did with message/rfc822.

You can allow everything, but it is dangerous, so I wouldn't recommend it. To allow everything, use:
$uploaded->allowed = array('*/*');

You can then later add some dangerous MIME types in forbidden to explicitly prevent your users to upload some dangerous files.Reply