1

I have an uploaded file my_cat.jpg Upon upload, the file-entity's name is by default populated with the file's filename.

Try one: In views, adding a field file:name to my view first looks like the correct answer. But that's the file-entity's name, which can, even after the upload, be changed to eg. My cat, while the filename on the disk will never change.

Try two: If i add a file:path field, i can decide if it should output the Download-URL or the internal Filestream-Adress. But no way to leave out the path completely... From the field's name, that's not a big surprise.

So, how can i get just the filesystem-filename my_cat.jpg?

2
  • Are you on Drupal 7 or 8? Commented Feb 28, 2018 at 21:44
  • I am using Drupal 7
    – sirtet
    Commented Mar 1, 2018 at 13:23

1 Answer 1

1

In Drupal 8: in Relationships, add a relationship to your image (mine looks like: Image, (field_image:target_id), Content, Appears in: image). In the next step select "Require this relationship". Now, in Fields, you have the filename field available.

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.