0

I've got a column of links to files in a table. They're displayed via file-fields with 'Output this field as a link" enabled in Rewrite Results. It's works great with fx images but width pdf's the table only shows the filename, not the path to it.

Any ideas on how to always show the complete path to a file no matter the file type?

0
  1. In views Change the Formatter of the field from Generic file to URL to file.
  2. Go to REWRITE RESULTS and check 'Output this field as link' and use replacement pattern of the file field.
  3. check Use absolute path to get absolute path link of the file

That's it you will get complete path of the file instead of file name at output.

enter image description here

  • Thanks, but the URL to File formatter isn't available in my field, only 'rendered file, image, image link formatter'. I've used 'rendered file'. – Kristoffer Rom May 30 '14 at 10:33
  • Drupal: 7.24 & views: 7.x-3.7 – Kristoffer Rom May 30 '14 at 13:55
  • @KristofferRom I think you don't have Entity API module enabled right.I think that might be the problem – Krishna Mohan May 30 '14 at 14:24
  • it is enabled I'm afraid. I've just discovered that the field isn't actually a drupal.org/project/filefield but an imagefield accepting PDFs too. Could that be the issue? If so, any way to convert the fields without loosing all the content in them? – Kristoffer Rom May 30 '14 at 14:28
  • @KristofferRom I wonder, if its an image field it's not possible to upload pdf files even if add 'pdf'in Allowed file extensions. Can you please check it once. – Krishna Mohan May 30 '14 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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