Skip to content

Commit

Permalink
fixed _blobfiels.filename bytes as str
Browse files Browse the repository at this point in the history
svn path=/ZMS/branches/zms4/; revision=5777
  • Loading branch information
zmsdev committed Aug 12, 2020
1 parent 12ed2a1 commit 7a9fafb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Products/zms/_blobfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ def uploadBlobField(self, clazz, file=b'', filename=''):
blob.update_data(file, content_type=mt, size=len(file))
blob.aq_parent = self
blob.mediadbfile = None
# blob.filename = _fileutil.extractFilename( filename, undoable=True).encode('utf-8')
blob.filename = standard.pybytes(_fileutil.extractFilename( filename, undoable=True).encode('utf-8'))
blob.filename = standard.pystr(_fileutil.extractFilename( filename, undoable=True))
# Check size.
if self is not None:
maxlength_prop = 'ZMS.input.%s.maxlength'%['file','image'][isinstance(blob,MyImage)]
Expand Down

0 comments on commit 7a9fafb

Please sign in to comment.