[
http://jira.magnolia.info/browse/MGNLDMS-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17777#action_17777
]
Jan Haderka commented on MGNLDMS-96:
------------------------------------
The confusion comes from the fact that DMS stores the file type separately in
the String type node data called "type". Apart from that extension of the
uploaded file is stored also as an "extension" attribute of the binary node
data holding uploaded file data. So in theory you can use both to filter the
query results. With the default dms configuration I was not able to create an
situation in which value of "type" property and "extension" attribute would not
be in sync. If you were able to create such situation, please describe it here.
> sample DMS paragraph filters on 'extension' instead of 'type'
> -------------------------------------------------------------
>
> Key: MGNLDMS-96
> URL: http://jira.magnolia.info/browse/MGNLDMS-96
> Project: Magnolia DMS Module
> Issue Type: Bug
> Affects Versions: 1.1, 1.1.1
> Environment: Debian/VMware, Magnolia CE 3.0.2 bundle
> Reporter: Todd Farrell
> Assignee: Philipp Bracher
> Priority: Trivial
> Fix For: 1.2.6
>
> Original Estimate: 1 minute
> Remaining Estimate: 1 minute
>
> Please excuse me if this is not a bug; I may just not understand the DMS
> correctly :-)
> In
> modules/community/magnolia-module-dms/trunk/src/main/resources/mgnl-files/templates/dms/paragraphs/dms.jsp:
> // search on file type
> if(StringUtils.isNotEmpty(extension)){
> expressions.add("extension = '" + extension + "'");
> }
> I needed to change this to query based on the "type" attribute for it to work
> when specifying a particular extension (e.g. "pdf").
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------