The URIs of files are not very "clean" (in file_managed)
e.g. public://tesdir-imagesx/d//./dsc00212.jpg

This is using just the Global settings for files of type Image. (I have added a custom token for taking the first character of a filename, if anyone wonders where the 'd' directory came from).

Comments

szantog’s picture

Status: Active » Postponed (maintainer needs more info)

What is exactly in global settings image part? What is the original filename? (dsc00212.jpg, I think so.) What is the token value in the http://yoursite.com/file/[FID]/devel/token page?

paulbeaney’s picture

Hi,

Thanks for all the other tweaks over the last few days. I'll test them later this week. With regards to your questions above (this is with the latest version of the Alpha code), I can no longer re-produce this problem.

However, I have found that if you leave a trailing slash on the path settings in "Global settings for image" (e.g. public://tesdir-imagesx/[file:ffp-first-letter]/), you end up with a double slash in the URI in table file-managed (e.g. public://tesdir-imagesx/d//divers_107_0.jpg).

Regards,

- Paul

szantog’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Good point, to be safe, added warning test to the description. And many thanks for the detailed testing!

skdrupal88’s picture

Issue summary: View changes
Priority: Minor » Normal
Status: Closed (works as designed) » Active

Have the same an error.
I have:

$file->uri = public://moon/dms/2015/Create a demo//bulge.gif;
$new_uri =public://moon/dms/2015/Create a demo/bulge.gif;

(differences in double slash)

And following code doesn't work (fe_paths.module:399):

  $new_uri = $scheme . '://' . $path . '/' . $filename;
  $directory = $scheme . '://' . $path;

  if ($new_uri == $file->uri) {
    return $file;
  }