File Repository - Documentation topics on: deprecated,file repository,files,macros,pulling files,velocity,.

File Repository
Deprecated

Please note this Macro is Deprecated and will be removed in a later version.

It is simple to create a file repository using dotCMS and the tools provided by the system.  Below is an example that queries the content repository for all "Files" (+contentType:4) who have the parentPath of "/images/".    The query to search the files can be as complex as needed.

<table border="1">
<tr>
<th>thumbnail</th>
<th>uri</th>
<th>inode</th>
<th>identifier</th>
<th>path</th>
<th>mimeType</th>
<th>extension</th>
<th>fileSize</th>
<th>width</th>
<th>height</th>
<th>metaData dataPrecision</th>
</tr>
#foreach($file in $dotcontent.pull("+parentPath:/images/ +contentType:4", 10, "modDate"))
<tr>
<td><img src="/contentAsset/image/$file.identifier/fileAsset/filter/Thumbnail/thumbnail_w/150/thumbnail_h/150/thumbnail_bg/255255255"></td>
<td>$file.fileAsset.uri</td>
<td>$file.inode</td>
<td>$file.identifier</td>
<td>$file.fileAsset.path</td>
<td>$file.fileAsset.mimeType</td>
<td>$file.fileAsset.extension</td>
<td>$UtilMethods.prettyByteify($file.fileAsset.fileSize)</td>
<td>$file.fileAsset.width</td>
<td>$file.fileAsset.height</td>
<td>$file.metaData.dataPrecision </td>
</tr>
#end
</table>

Results in: