Ok, I think I sorted out something on myself:
/admin/controller/common/filemanager.php
At line 95
Code: Select all
if (isset($this->request->post['directory']) && $this->request->post['directory']) {
$directory = DIR_IMAGE . 'data/' . str_replace('../', '', $this->request->post['directory']);
} else {
$directory = DIR_IMAGE . 'data/';
}
$allowed = array(
'.jpg',
'.jpeg',
'.png',
'.gif'
);
added in array:
Code: Select all
$allowed = array(
'.jpg',
'.jpeg',
'.png',
'.swf',
'.gif'
At line 447
Code: Select all
if ($this->request->files['image']['size'] > 300000) {
$json['error'] = $this->language->get('error_file_size');
}
$allowed = array(
'image/jpeg',
'image/pjpeg',
'image/png',
'image/x-png',
'image/gif',
'application/x-shockwave-flash'
);
Added one more "application/x-shockwave-flash"
Code: Select all
$allowed = array(
'image/jpeg',
'image/pjpeg',
'image/png',
'image/x-png',
'image/gif',
'application/x-shockwave-flash',
'application/x-shockwave-flash'
);
At line 461
Code: Select all
if (!in_array($this->request->files['image']['type'], $allowed)) {
$json['error'] = $this->language->get('error_file_type');
}
$allowed = array(
'.jpg',
'.jpeg',
'.gif',
'.png',
'.flv'
);
Added swf again:
Code: Select all
$allowed = array(
'.jpg',
'.jpeg',
'.gif',
'.png',
'.swf',
'.flv'
);
Seems to work to me, now I can upload and select swf files through CKeditor.
Please check if something was unnecessary or my modifications may cause any troubles on other aspects.