You can modify the transformation so it generates also link and not only preview image. The link could point to some document with Media Gallery web part and could contain LibraryName as query string parameter.
For example:
~/GalleryDetail.aspx?libname=<%# Eval("LibraryName") %>
The Media Gallery web part would get the Library name and use it. You can use following macro in Library name attribute of Media Gallery web part: {?libname?}
At first you need to place Media files data source webpart to the page where you want to use Media Gallery - File List. Then you will just use its ID in the File List webpart.
Now if you want to show only certain folder you may need define Where Condition property of Datasource webpart, for example:
FilePath LIKE N'folder/%' AND FilePath NOT LIKE N'folder/%_/%'
Please note 'folder' is folder which is under current media library. This will show files from 'folder' path and not other else.
The system uses the resized versions of media files only if you use the permanent URLs. Please see the settings in:
Site manager -> Settings -> Media libraries -> Site: <your site> -> Use permanent URLs
If the checkbox is unchecked it does not use the resized images from disk. If you check the checkbox it can greatly improve the page performance.
There is mistake in sample code in documentation. We are very sorry for this inconvenience. Basically you only need to change following line in example:
if (this.Type.TrimStart('.').ToLower() == "flv")
to:
if ((this.Type != null) && (this.Type.TrimStart('.').ToLower() == "flv"))