I use a media module to select file from library, in field option on my field I specify a custom sub directory(it's name is gift_cards) that I have been created in public path. but when the media file selector popup triggered I see all images instead images that on gift_cards. where is the problem, and how can I restrict my custom field to load only image that are in gift_cards directory?

one suggest is using filedeop module , but I don`t want use this module (this is big module with more feature but my needs is something tiny) , restrict to show only custom sub directory in public://

1 Answer 1


Option 1

Media Browser Plus module states that it will allow

Personal and public “folders”

Which might answer to your needs

Option 2

Views Media Browser should allow you to specify a view to use as the media browser - you could then filter the view based on file path or other file attribute to get the result you are after.

Option 3

If you are using v2 of Media module you can apparently define a View with a 'views media browser' display to create your media module listing. Media module 2.x is currently in alpha, so take care if you wanted to go down this route, and obviously do not test on live site.

see https://drupal.org/node/1547884

  • 1
    Unfortunately neither of those allow you to do such a simple thing as "pick a directory where files will be uploaded to and selected from" :( Feb 25, 2015 at 16:51

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.