Updated python converter backend, document model and staging module to use the new get_mimetype API

This commit is contained in:
Roberto Rosario
2011-11-07 00:05:25 -04:00
parent 160950b6f4
commit 557c960094
3 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -138,6 +138,7 @@ class StagingFile(object):
try:
return convert(self.filepath, size=size, cleanup_files=False, transformations=transformations)
except UnknownFileFormat:
return get_icon_file_path(get_mimetype(self.filepath))
mimetype, encoding = get_mimetype(open(self.filepath, 'rb'), self.filepath)
return get_icon_file_path(mimetype)
except UnkownConvertError:
return get_error_icon_file_path()