Linking to private files should use 'system/files/' instead of 'sites/*/private/'.

Comments

PascalAnimateur created an issue. See original summary.

PascalAnimateur’s picture

Status: Active » Needs review
StatusFileSize
new814 bytes

Simple patch that fixes the issue in my case.

chrisgross’s picture

This patch works for me, but from what I can tell, the path doesn't need to be absolute since 'system/files' is a valid drupal path.

anon’s picture

Status: Needs review » Needs work

We need a test for this.

m.ok’s picture

The patch works well. But I agree with #3, because now the absolute path may cause other problems, e.g. during migration. Is it possible to use a relative path to system/files for private files?

dsnopek’s picture

Ah, I just noticed this issue, but unfortunately after creating an issue of my own:

#2922306: Direct links to private files are wrong

I got thrown off by the title on the issue because it isn't really problem that they are relative, just the way that the relative paths are generated.

The patch over on my issue fixes this problem, but in a way that keeps the private links relative.

Please let me know what you think!

queenvictoria’s picture

I'm using @dsnopek 's fix. Works well.