Jump to content

Filemanager not uploading anything


Recommended Posts

Hello,

 

I'm having problems with the filemanager when I'm adding the product description.

 

I try to upload something, it's uploaded correctly and when I'm try to add it to the product description, the file recently added just doesn't appear.

 

If I upload the file by FTP, it doesn't appear.

 

I tryied to change the upload directory. It happends with all kind of files.

 

What happend?

 

Thanks

 

PD: Sorry for my bad english

post-729719-0-55330400-1397826960_thumb.png

post-729719-0-64921100-1397826961_thumb.png

post-729719-0-53619100-1397826962_thumb.png

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Have the same problem, filemanager makes folder, upload files to /img/cms/myfoldername/myimge.jpg, but filemanager in admin display sourse of images from: /admin[number]/img/cms/myfoldername/myimge.jpg, thats what need to be fix or tell us where to change this, cheers

Link to comment
Share on other sites

solution by my self:

path: /admin/filemanager/config/config.php

replace
$upload_dir = __PS_BASE_URI__.'img/cms/';
to
$upload_dir = '/img/cms/';


path: /admin/filemanager/dialog.php

replace
$mini = $thumb = __PS_BASE_URI__.substr($thumbs_path.$subdir.$file, strlen(_PS_ROOT_DIR_) + 1);
to
$mini = $thumb = '/'.substr($thumbs_path.$subdir.$file, strlen(_PS_ROOT_DIR_) + 1);

Link to comment
Share on other sites

  • 4 months later...
  • 2 weeks later...

Thanks for the solution Knightrider132.
It works well if you don't use a folder or a virtual folder on your server to install prestashop.

If you intalled it this way, try this:

path: /admin/filemanager/config/config.php

replace
$upload_dir = __PS_BASE_URI__.'img/cms/';
to
$upload_dir = preg_replace('/\/admin\d*\//i','/',__PS_BASE_URI__).'img/cms/';


path: /admin/filemanager/dialog.php

replace
$mini = $thumb = __PS_BASE_URI__.substr($thumbs_path.$subdir.$file, strlen(_PS_ROOT_DIR_) + 1);
to
$mini = $thumb = preg_replace('/\/admin\d*\//i','/',__PS_BASE_URI__).substr($thumbs_path.$subdir.$file, strlen(_PS_ROOT_DIR_) + 1);

 

 

Hope this help.

  • Like 1
Link to comment
Share on other sites

Thanks for the solution Knightrider132.

It works well if you don't use a folder or a virtual folder on your server to install prestashop.

 

If you intalled it this way, try this:

 

path: /admin/filemanager/config/config.php

 

replace

$upload_dir = __PS_BASE_URI__.'img/cms/';

to

$upload_dir = preg_replace('/\/admin\d*\//i','/',__PS_BASE_URI__).'img/cms/';

path: /admin/filemanager/dialog.php

 

replace

$mini = $thumb = __PS_BASE_URI__.substr($thumbs_path.$subdir.$file, strlen(_PS_ROOT_DIR_) + 1);

to

$mini = $thumb = preg_replace('/\/admin\d*\//i','/',__PS_BASE_URI__).substr($thumbs_path.$subdir.$file, strlen(_PS_ROOT_DIR_) + 1);

 

 

Hope this help.

Edited by lunara (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...