Issue #2155245 by ChristianAdamski, scor, areke: Use proper methods instead of directly calling $file->filename and $file->uri