Commit 7b732549 authored by Nicolas Delaby's avatar Nicolas Delaby

orignal_filename does not exists, source_reference is used to store the original filename

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28947 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 402cbbce
# -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -163,7 +164,7 @@ class File(Document, CMFFile, ConversionCacheMixin): ...@@ -163,7 +164,7 @@ class File(Document, CMFFile, ConversionCacheMixin):
""" """
get mime type from file name get mime type from file name
""" """
if fname == '': fname = self.getOriginalFilename() if fname == '': fname = self.getSourceReference()
if fname: if fname:
content_type,enc = mimetypes.guess_type(fname) content_type,enc = mimetypes.guess_type(fname)
if content_type is not None: if content_type is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment