Changeset 9931
- Timestamp:
- 2 Feb 2013, 17:09:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9930 r9931 1039 1039 target = os.path.join(self.context.storage, normalized_filename) 1040 1040 filecontent = uploadfile.read() 1041 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 1042 logger = self.context.logger 1041 1043 1042 1044 # XXX: temporary solution to prevent users from … … 1047 1049 self.flash(_( 1048 1050 "Only ASCII files are allowed. " 1049 "Your file contains non-ascii characters.")) 1051 "Your file contains non-ASCII characters.")) 1052 logger.info('%s - non-ascii file uploaded: %s' % 1053 (ob_class, target)) 1050 1054 return 1051 1055 except TypeError: … … 1053 1057 "Only ASCII files are allowed. " 1054 1058 "Your file contains non-ASCII characters.")) 1059 logger.info('%s - non-ascii file uploaded: %s' % 1060 (ob_class, target)) 1055 1061 return 1056 1062 1057 1063 open(target, 'wb').write(filecontent) 1058 1064 os.chmod(target, 0664) 1059 logger = self.context.logger1060 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','')1061 1065 logger.info('%s - uploaded: %s' % (ob_class, target)) 1062 1066 self._notifyImportManagers(filename,
Note: See TracChangeset for help on using the changeset viewer.