unable to upload list

Khoi Nguyen

New Member
when i try to upload .csv i get error
  • The file "Clients.csv" cannot be uploaded. Only files of these MIME-types are allowed: application/zip, application/x-zip, application/x-zip-compressed, application/octet-stream, application/x-compress, application/x-compressed, multipart/x-zip.
when i uploaded .zip i get
  • The file "Clients.csv.zip" cannot be uploaded. Only files with these extensions are allowed: csv.
both are enabled.
 

Md.Arifuzzaman

New Member
i have also facing same problem disable mime type checking but not resolve error message show : Unable to upload "Product.zip".
File type not allowed.
(application/x-zip-compressed)
 

twisted1919

Administrator
Staff member
Ah, you mean via the file manager. That allows only images. Let me check for a hook you could add to allow zip files.
 

twisted1919

Administrator
Staff member
Okay, so create a file called init-custom.php in the /apps/ folder over ftp with this content:
PHP:
<?php

Yii::app()->hooks->addFilter('ext_ckeditor_el_finder_options', function($elfinderOpts) {
    $elfinderOpts['roots'][0]['uploadAllow'][] = 'application/x-zip-compressed';
    $elfinderOpts['roots'][0]['uploadAllow'][] = 'application/x-compress';
    $elfinderOpts['roots'][0]['uploadAllow'][] = 'application/x-compressed';
    $elfinderOpts['roots'][0]['uploadAllow'][] = 'multipart/x-zip';

    return $elfinderOpts;
});
 

Md.Arifuzzaman

New Member
<?php

Yii::app()->hooks->addFilter('ext_ckeditor_el_finder_options', function($elfinderOpts) {
$elfinderOpts['roots'][0]['uploadAllow'][] = 'application/x-zip-compressed';
$elfinderOpts['roots'][0]['uploadAllow'][] = 'application/x-compress';
$elfinderOpts['roots'][0]['uploadAllow'][] = 'application/x-compressed';
$elfinderOpts['roots'][0]['uploadAllow'][] = 'application/zip'; ( i have added this line and now it's work)
$elfinderOpts['roots'][0]['uploadAllow'][] = 'multipart/x-zip';

return $elfinderOpts;
});


Please advised me how can i create share link
 
Top