1
0
Fork 0

Add octet stream mime type to images so we can upload from the javascript.

This commit is contained in:
Andrew Tomaka 2011-11-05 12:37:19 -04:00
parent 70c40f4e72
commit 39b13ab303
2 changed files with 6 additions and 7 deletions

View file

@ -66,12 +66,12 @@ $mimes = array( 'hqx' => 'application/mac-binhex40',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => 'audio/x-wav',
'bmp' => 'image/bmp',
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'png' => array('image/png', 'image/x-png'),
'bmp' => array( 'image/bmp', 'application/octet-stream'),
'gif' => array( 'image/gif', 'application/octet-stream'),
'jpeg' => array('image/jpeg', 'image/pjpeg', 'application/octet-stream'),
'jpg' => array('image/jpeg', 'image/pjpeg', 'application/octet-stream'),
'jpe' => array('image/jpeg', 'image/pjpeg', 'application/octet-stream'),
'png' => array('image/png', 'image/x-png', 'application/octet-stream'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => 'text/css',

View file

@ -16,7 +16,6 @@ class Upload extends CI_Controller {
$this->load->library('upload', $config);
if (!$this->upload->do_upload('image')) {
print_r($this->upload->data());
$message = array('type' => 'error', 'status' => $this->upload->display_errors());
} else {
$data = array('upload_data' => $this->upload->data());