--- a/src/pyams_file/file.py Tue Oct 23 12:09:30 2018 +0200
+++ b/src/pyams_file/file.py Wed Oct 24 09:24:14 2018 +0200
@@ -12,36 +12,31 @@
__docformat__ = 'restructuredtext'
-
-# import standard library
-import os
-import shutil
try:
import magic
except ImportError:
magic = None
+import os
+import shutil
from io import BytesIO
-from PIL import Image
-
-# import interfaces
-from pyams_file.interfaces import IFile, IImage, ISVGImage, IVideo, IAudio, IFileInfo, FileModifiedEvent
-from zope.copy.interfaces import ICopyHook, ResumeCopy
-from zope.location.interfaces import IContained
-# import packages
+from PIL import Image
+from ZODB.blob import Blob
from persistent import Persistent
-from pyams_utils.adapter import adapter_config, ContextAdapter
+from zope.container.contained import Contained
+from zope.copy.interfaces import ICopyHook, ResumeCopy
+from zope.interface import implementer
+from zope.location.interfaces import IContained
+from zope.schema.fieldproperty import FieldProperty
+
+from pyams_file.interfaces import FileModifiedEvent, IAudio, IFile, IFileInfo, IImage, ISVGImage, IVideo
+from pyams_utils.adapter import ContextAdapter, adapter_config
from pyams_utils.request import check_request
-from ZODB.blob import Blob
-from zope.container.contained import Contained
-from zope.interface import implementer
-from zope.schema.fieldproperty import FieldProperty
BLOCK_SIZE = 1 << 16
-
EXTENSIONS_THUMBNAILS = {
'.7z': 'application-x-7z-compressed.png',
'.ac3': 'audio-ac3.png',