Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
ufku CreditAttribution: ufku commentedThat 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.
Comment #2
fhuberts CreditAttribution: fhuberts commentedcorrect, I was too quick on the draw :-)
closed it.