to make imce return the correct relative path, replace the function imce_relative_url in imce.module with the one below:

function imce_relative_url($path='') {
if (variable_get('file_downloads', '')==FILE_DOWNLOADS_PRIVATE) {
$file = trim(substr($path, strlen(file_directory_path())), '\\/');
return 'files'.(strlen($file) ? '/'.$file : '');
// return url('system/files').(strlen($file) ? '/'.$file : '');
}
return base_path().$path;
}

Comments

ufku’s picture

That function returns an URL not a path. And the line you have commented out is required by PRIVATE DOWNLOAD method.
If you are convinced please close the issue or explain why it should be the way you change it.

fhuberts’s picture

Status: Active » Closed (fixed)

correct, I was too quick on the draw :-)
closed it.