我正在使用JQuery FileUpload上传我服务器上的文件。
我需要在上传的html区域中删除任何类型的缩略图,但即使我配置了javascript和php以避免缩略图,我仍然会在两种情况下使用它们:
我根本不希望盒子里有缩略图的空间。 这些是我的配置(我只复制感兴趣的代码)
这是我的配置javascript
$('#fileupload').fileupload({
**previewSourceFileTypes: '',**
url: 'tfnav?page=upload'
});
这是我的配置php:
$this->options = array(
'script_url' => $this->get_full_url().'/',
'upload_dir' => $this->_hAttach->getUploadPath(),
'upload_url' => $this->get_full_url().'/files/',
'user_dirs' => false,
'mkdir_mode' => 0755,
'param_name' => 'files',
'delete_type' => 'DELETE',
'access_control_allow_origin' => '*',
'access_control_allow_credentials' => false,
'access_control_allow_methods' => array(
'OPTIONS',
'HEAD',
'GET',
'POST',
'PUT',
'PATCH',
'DELETE'
),
'access_control_allow_headers' => array(
'Content-Type',
'Content-Range',
'Content-Disposition'
),
'download_via_php' => false,
// Defines which files can be displayed inline when downloaded:
**'inline_file_types' => '',**
// Defines which files (based on their names) are accepted for upload:
'accept_file_types' => '/.+$/i',
....
但这些配置还不够,我该如何删除它们? 非常感谢提前
答案 0 :(得分:2)
在UploadHandler.php里面
在'image_versions'中对所有内容进行评论
'image_versions' => array()
或者你可以这样做
$upload_handler = new UploadHandler(array(
'image_versions' => array() // no image versions
));