adding more mimes type

This commit is contained in:
Cayo Puigdefabregas 2021-08-13 17:16:31 +02:00
parent 9086bb628f
commit b2390f3010
1 changed files with 8 additions and 1 deletions

View File

@ -275,7 +275,14 @@ class StampsView(View):
ok = '100% coincidence. The attached file contains data 100% existing in \
to our backend'
result = ('Bad', bad)
if file_check.mimetype in ['text/csv', 'application/pdf']:
import pdb; pdb.set_trace()
mime = ['text/csv', 'application/pdf', 'text/plain','text/markdown',
'image/jpeg', 'image/png', 'text/html',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/msword']
if file_check.mimetype in mime:
if verify_hash(file_check):
result = ('Ok', ok)