Skip to content. | Skip to navigation

Personal tools
Sections
You are here: Home Topics FSS
Navigation
 

FSS

Apr 28, 2010

Where is my FSS file?

by Andrew Mleczko — last modified Apr 28, 2010 09:52 AM
Filed Under:

Sometimes you need to know where is your FSS file on disk. There is an easy way to get the full path

Following example returns full path to ATFile 'file' field on disk:

>>> field = self.context.getField('file')
>>> fss_info = field.storage.getFSSInfo('file',self.context)
>>> fss_info
<FSSFileInfo at test-file.pdf/>
>>> fss_strategy = field.storage.getStorageStrategy('file',self.context)
>>> fss_strategy
<iw.fss.strategy.DirectoryStorageStrategy instance at 0x21332c68>
>>> fss_props = field.storage.getStorageStrategyProperties('file',self.context,fss_info)
>>> path = fss_strategy.getValueFilePath(**fss_props)
>>> path
'/opt/buildout.plone/var/fss_storage_global/5b/5b09/5b09c322ae211207649e1803fe012cca_file'