Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Supported image types
IMAGE = (
image.Jpeg(),
image.Jpx(),
image.Png(),
image.Gif(),
image.Webp(),
image.Cr2(),
image.Tiff(),
image.Bmp(),
image.Jxr(),
image.Psd(),
image.Ico(),
image.Heic(),
image.Dcm(),
)
# Supported video types
VIDEO = (
video.Mp4(),
video.M4v(),
video.Mkv(),
video.Mov(),
video.Avi(),
video.Wmv(),
video.Mpeg(),
video.Webm(),
video.Flv(),
)
# Supported audio types
def match(self, buf):
return (len(buf) > Dcm.OFFSET + 4 and
buf[Dcm.OFFSET + 0] == 0x44 and
buf[Dcm.OFFSET + 1] == 0x49 and
buf[Dcm.OFFSET + 2] == 0x43 and
buf[Dcm.OFFSET + 3] == 0x4D)
def __init__(self):
super(Dcm, self).__init__(
mime=Dcm.MIME,
extension=Dcm.EXTENSION
)
def __init__(self):
super(Dcm, self).__init__(
mime=Dcm.MIME,
extension=Dcm.EXTENSION
)
def __init__(self):
super(Dcm, self).__init__(
mime=Dcm.MIME,
extension=Dcm.EXTENSION
)