0

I have the following set up:

  • Private file field configured on content type
  • Access control configured with referenced user having permission to view file
  • If user is referenced on the node, they can view the private file of that node.

Here is the issue that I am having:

  • A specific file could not be loaded. Drupal Redirects as if the user does not have proper permissions to view the file.
  • Other files, with an identical setup work fine
  • If I download the file, rename it and re-upload to a new node, it works
  • If I download the file, rename it and then re-upload on the original node it works

So, I have an intermittent issue where a tiny subset of files are not able to viewed by the user. What could possibly cause a single node/file combo to fail as described above?

1 Answer 1

0

I suspect the problem is in the symbols of the file name. Probably, when PHP do the file_exists - it may get false because the file is not 'visible'. Try this https://www.drupal.org/project/transliterate_filenames or similar modules to transliterate the filenames during the uploads.

See more here File name transliteration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.