0

Want to be able to see what content has file field(s) that refer to a specific file.

Is this do-able using a View (with Relationships)? (had a go already, unsuccessful so far). Alternatively I'd query database tables (via the proper API) and relate that way, but just thought I'd ask if there is a generic solution before potentially re-inventing the wheel.

Searched a lot butn get a lot of unrelated search results. Search engine cannot seem to be told that I want my terms ordered in a certain way.

Ultimately I'd like to have a View that shows the Files and the content that uses each file. I would then be able to see the impact of deleting a file for example.

1 Answer 1

2

Create a view of type files: Creating a view of type files

Add a relationship to 'Content', make sure you set it as required: Relationship to content

Add any fields you wish to see of the file or the node.

6
  • What about other file types, other than Image? Like .xlsx etc.? Thanks @Maarten De Block so far... May 15, 2015 at 11:20
  • Ah, there is also a File: Content using Files I saw, I'll look into that... May 15, 2015 at 11:22
  • For every field of type file or image you make, a new relationship will become available. Please mark as answered if this solves your problem. May 15, 2015 at 11:30
  • +1 upvote, I think this is the solution I am looking for, I'm still looking into it as I would be expecting the View result to show a column with node id after adding this relationship and then adding a File: Content using Files field to the Fields. Would this solution work for any content type that has a File field? May 15, 2015 at 14:00
  • You need to add fields, this could be nid, or any other field of the node or file. And this wil indeed work for every content type with a file field. May 15, 2015 at 17:31

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.