[CPS-devel] AttributeStorageAdapter

Joachim Schmitz js at aixtraware.de
Tue Sep 19 18:08:25 CEST 2006


the _getContentUrl() of CPSSchemas.AttributeStorageAdapter is defined as:
def _getContentUrl(self, object, field_id, file_name):
     return '%s/downloadFile/%s/%s' % (
             object.absolute_url(), field_id, file_name)

this does not generate an valid url for display.

the following patch works for me:

def _getContentUrl(self, object, field_id, file_name):
     return '%s/%s' % (
         object.aq_parent.absolute_url(), field_id)


-- 
Mit freundlichen Grüßen                                Joachim Schmitz
......................................................................
AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851
Hüsgenstr. 33a .....d-52457 Aldenhoven .............f: +49-2464-905163





This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.