|
|
|
|
|
|
|
|
response = flask.make_response(MINIO.get(file.parent_id, file.location)) |
|
|
response = flask.make_response(MINIO.get(file.parent_id, file.location)) |
|
|
ext = re.search(r"\.([^.]+)$", file.name) |
|
|
ext = re.search(r"\.([^.]+)$", file.name) |
|
|
if ext: |
|
|
if ext: |
|
|
if doc.type == FileType.VISUAL.value: |
|
|
|
|
|
|
|
|
if file.type == FileType.VISUAL.value: |
|
|
response.headers.set('Content-Type', 'image/%s' % ext.group(1)) |
|
|
response.headers.set('Content-Type', 'image/%s' % ext.group(1)) |
|
|
else: |
|
|
else: |
|
|
response.headers.set( |
|
|
response.headers.set( |