It seems that while trying to get the size it puts the system path in the image filepath...

Comments

David Hull’s picture

Assigned: Unassigned » David Hull
StatusFileSize
new1.45 KB

Actually, that was intentional. The path in the files table is relative to the file_directory_path directory. I use the default file_directory_path of "files", so calling file_create_path makes it relative to the top-level drupal directory. This is the URL that is returned in the img tag.

However, I see that this would be a problem if you used an absolute directory name for file_directory_path (you'd also need to have file_downloads set to FILE_DOWNLOADS_PRIVATE). I see also that there's a function file_create_url I should probably be calling instead. Try the attached patch and see if it works.

magico’s picture

I tested and it works! Thanks

David Hull’s picture

Great! I've applied the fix in CVS and 4.6.0.

Anonymous’s picture