Ignore:
Timestamp:
01.02.2011 13:55:21 (16 months ago)
Author:
cmeier
Message:

3.1.7

  • applied fix for zip archives with subfolders
  • ignore hidden files with suffix "." (e.g. in MACOSX in Apples archives)
  • allow upload of single image file instead of zip archive
File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMESS/mediaplayer/branches/3.1/com/zms/mediaplayer/mediaplayer.metaobj.xml

    r1317 r1347  
    17501750 
    17511751def getFileList(): 
    1752         temp_files = context.getZipArchive(context.getObjProperty('galleryUpload', REQUEST)) 
    1753         temp_files = filter(lambda x: x['content_type'].find('image') >= 0, temp_files) 
     1752        temp_file = context.getObjProperty('galleryUpload', REQUEST) 
     1753         
     1754        if (temp_file.getContentType().find('image') >= 0): 
     1755                temp_files = [{'filename'                               : temp_file.getFilename(), 
     1756                                                                                'data'                                  : str(temp_file.getData()),  
     1757                                                                                'content_type'  : temp_file.getContentType()}] 
     1758        else: 
     1759                temp_files = context.getZipArchive(context.getObjProperty('galleryUpload', REQUEST)) 
     1760                temp_files = filter(lambda x: (not x['isdir']) and (x['content_type'].find('image') >= 0) and (not x['filename'].startswith('.')), temp_files) 
    17541761         
    17551762        return temp_files 
     
    20252032            <item key="name"><![CDATA[ZMSGallery]]></item> 
    20262033            <item key="package"><![CDATA[com.zms.mediaplayer]]></item> 
    2027             <item key="revision"><![CDATA[2.1.14]]></item> 
     2034            <item key="revision"><![CDATA[2.1.15]]></item> 
    20282035            <item key="type"><![CDATA[ZMSObject]]></item> 
    20292036          </dictionary> 
     
    51875194            <item key="name"><![CDATA[com.zms.mediaplayer]]></item> 
    51885195            <item key="package"/> 
    5189             <item key="revision"><![CDATA[3.1.6]]></item> 
     5196            <item key="revision"><![CDATA[3.1.7]]></item> 
    51905197            <item key="type"><![CDATA[ZMSPackage]]></item> 
    51915198          </dictionary> 
Note: See TracChangeset for help on using the changeset viewer.