Jump to content
ber78

Subir archivos de todo tipo (prestashop 1.6)

Recommended Posts

No encontre ayuda al respeto, pero he podido resolverlo y comparto:

 

Modificar: "/site/admin/filemanager/config/config.php"

 

$ext_img = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg'); //Images
$ext_file = array('pdf', 'doc', 'docx','rtf', 'pdf', 'xls', 'xlsx', 'txt',

'csv','html','xhtml','psd','sql','log','fla','xml','ade','adp','mdb','accdb','ppt','pptx','odt','ots','ott','odb','odg','otp',

'otg','odf','ods','odp','css','ai'); //array('doc', 'docx','rtf', 'pdf', 'xls', 'xlsx', 'txt',

'csv','html','xhtml','psd','sql','log','fla','xml','ade','adp','mdb','accdb','ppt','pptx','odt','ots','ott','odb','odg','otp',

'otg','odf','ods','odp','css','ai'); //Files
$ext_video = array('mov', 'mpeg', 'mp4', 'avi', 'mpg', 'wma', 'flv', 'webm'); //Video
$ext_music = array('mp3', 'm4a', 'ac3', 'aiff', 'mid','ogg','wav'); //Audio
$ext_misc = array('zip', 'rar','gz','tar','iso','dmg'); //Archives

 

y modificar "site/img/cms/.htaccess" añadiendo las extensiones que queramos que sean accesibles:

 

<IfModule mod_php5.c>
    php_flag engine off
</IfModule>
deny from all
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|doc|webm)$">
    order deny,allow
    allow from all
</Files>
 

Share this post


Link to post
Share on other sites

No encontre ayuda al respeto, pero he podido resolverlo y comparto:

 

Modificar: "/site/admin/filemanager/config/config.php"

 

$ext_img = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg'); //Images

$ext_file = array('pdf', 'doc', 'docx','rtf', 'pdf', 'xls', 'xlsx', 'txt',

 

'csv','html','xhtml','psd','sql','log','fla','xml','ade','adp','mdb','accdb','ppt','pptx','odt','ots','ott','odb','odg','otp',

 

'otg','odf','ods','odp','css','ai'); //array('doc', 'docx','rtf', 'pdf', 'xls', 'xlsx', 'txt',

 

'csv','html','xhtml','psd','sql','log','fla','xml','ade','adp','mdb','accdb','ppt','pptx','odt','ots','ott','odb','odg','otp',

 

'otg','odf','ods','odp','css','ai'); //Files

$ext_video = array('mov', 'mpeg', 'mp4', 'avi', 'mpg', 'wma', 'flv', 'webm'); //Video

$ext_music = array('mp3', 'm4a', 'ac3', 'aiff', 'mid','ogg','wav'); //Audio

$ext_misc = array('zip', 'rar','gz','tar','iso','dmg'); //Archives

 

y modificar "site/img/cms/.htaccess" añadiendo las extensiones que queramos que sean accesibles:

 

<IfModule mod_php5.c>

    php_flag engine off

</IfModule>

deny from all

<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|doc|webm)$">

    order deny,allow

    allow from all

</Files>

 

Hola, hice lo que comentas.... en mi caso quedó el archivo config.php quedó:

$ext_img = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg'); //Images
$ext_file = array('doc', 'docx','rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv','html','xhtml','psd','sql','log','fla','xml','ade','adp','mdb','accdb','ppt','pptx','odt','ots','ott','odb','odg','otp','otg','odf','ods','odp','css','ai'); //Files array('pdf', 'ai', 'psd', 'cdr', 'eps', 'xls'); //
$ext_video = array('mov', 'mpeg', 'mp4', 'avi', 'mpg', 'wma', 'flv', 'webm'); //Video
$ext_music = array();//array('mp3', 'm4a', 'ac3', 'aiff', 'mid','ogg','wav'); //Audio
$ext_misc = array('zip', 'rar','gz','tar','iso','dmg'); //Archives array();// 
 
$ext=array_merge($ext_img, $ext_file, $ext_misc, $ext_video, $ext_music); //allowed extensions

 

y el htaccess quedó:

<IfModule mod_php5.c>
php_flag engine off
</IfModule>
deny from all
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|flv|webm|ai|psd|cdr|eps|xls|zip|rar)$">
order deny,allow
allow from all
</Files>
 
Ahora me da este error:
The page you are looking for is temporarily unavailable.

Please try again later. 

259eda21cab312120d47beb15064d6b2 ffe71d6ccbaf2b3b81d6453d1646fcca 46bc041fe0f1ecb5e762e256551124e3

Si vuelvo a ingresar sin problemas la carga, pero no se guarda el archivo.
 
Creen que me pedan ayudar.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More