I'm working on Workbench module on Drupal 7. There is a "File List" tab and showing all images and files from the site. I would like to change this to be showing their uploaded files only.

PS: the "File List" Tab is from the "workbench_files" Views


First open the workbench file tab, then from the contextual menu on the right select edit view. enter image description here

Add the relationship 'The user that uploaded the file.' if it does not already exist. Above Relationship, you will see Contextual Filters (these are dynamic contextual parameters you pass to views). Add a contextual filter 'The User ID' and set the relationship to 'User who Uploaded'.

enter image description here

In the same window just below that there is a section 'When the filter value is not in the URL'. You select 'Provide default value'. This opens a select list, from which you choose 'Use ID from logged in user'

enter image description here

| improve this answer | |
  • sorry, it still not working by adding that relationship and filter :( – CocoSkin Jul 30 '14 at 21:26
  • My bad. You should add the filter as a contextual filter, and in the section : 'when the filter value is not in the url' tick provide default value and select 'User ID from logged in user'. – J. Reynolds Aug 1 '14 at 10:40
  • I dont see "when the filter value is not in the url" on Contextual Filter section – CocoSkin Aug 1 '14 at 16:06
  • that works. Thank you J. Reynolds. Is there a way to show the image thumbnail? Now right, it only show the file type icon on my field:Mime type. – CocoSkin Aug 4 '14 at 18:28
  • For that you have to add a field (if it is not already present) 'File:rendered' and select the appropriate File View Mode. Then go to admin/structure/file-types/manage/image/file-display and set the display on that file view mode (be careful not to touch Preview as it is used in the media browser also) – J. Reynolds Aug 5 '14 at 6:17

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.