0

I have a run time list of image files with their fid's. I am using Media module to handle image files. I want to load only specific set of image files fid's in the media browser on node add/edit page.

Please help me to achieve this specific stuff.

2
  • 1
    The media browser loads its content on a View so check if you can filter that to your needs. Commented Dec 17, 2015 at 5:31
  • Yes, I am trying to do like on that way. But the fid's are also need to read on run time from a multiple upload image field. and than pass it to media browser.
    – Shubham
    Commented Dec 17, 2015 at 6:31

1 Answer 1

1

This is little bit tricky. Media browser generally opens all the files. So, when we present the file field in the front end, we need to pass file type (Even we can pass fids too, after uploading the files).

On the views side either using views_query_alter or a filter in the views we need to filter them out.

Using this scenario we can alter media browser files options.

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.