goldsky / FileDownload-R

FileDownload snippet for MODX revolution
12 stars 7 forks source link

Display subset of files (based on filename) #46

Closed pierzy closed 8 years ago

pierzy commented 8 years ago

Hi goldsky! I would like to display only files with a name containing a given substring (in fact the substring will be the username of the currently logged in user). I thought to do it in _getDirContents around line 840 by only appending $fileInfo if it satisfies some criteria. Do you see a better way of doing this? Maybe this could also be a feature request. Best regards, Pier

goldsky commented 8 years ago

by using user's id as folder. so you can pull out files using

&getDir=`path/to/[[+modx.user.id]]/`