mirror of
https://github.com/veops/cmdb.git
synced 2025-08-08 08:39:24 +08:00
fix(api): check file ext with magic
This commit is contained in:
@@ -35,3 +35,32 @@ AuthCommonConfigAutoRedirect = 'auto_redirect'
|
||||
class TestType(BaseEnum):
|
||||
Connect = 'connect'
|
||||
Login = 'login'
|
||||
|
||||
|
||||
MIMEExtMap = {
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx',
|
||||
'application/msword': '.doc',
|
||||
'application/vnd.ms-word.document.macroEnabled.12': '.docm',
|
||||
'application/vnd.ms-excel': '.xls',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': '.xlsx',
|
||||
'application/vnd.ms-excel.sheet.macroEnabled.12': '.xlsm',
|
||||
'application/vnd.ms-powerpoint': '.ppt',
|
||||
'application/vnd.openxmlformats-officedocument.presentationml.presentation': '.pptx',
|
||||
'application/vnd.ms-powerpoint.presentation.macroEnabled.12': '.pptm',
|
||||
'application/zip': '.zip',
|
||||
'application/x-7z-compressed': '.7z',
|
||||
'application/json': '.json',
|
||||
'application/pdf': '.pdf',
|
||||
'image/png': '.png',
|
||||
'image/bmp': '.bmp',
|
||||
'image/prs.btif': '.btif',
|
||||
'image/gif': '.gif',
|
||||
'image/jpeg': '.jpg',
|
||||
'image/tiff': '.tif',
|
||||
'image/vnd.microsoft.icon': '.ico',
|
||||
'image/webp': '.webp',
|
||||
'image/svg+xml': '.svg',
|
||||
'image/vnd.adobe.photoshop': '.psd',
|
||||
'text/plain': '.txt',
|
||||
'text/csv': '.csv',
|
||||
}
|
||||
|
Reference in New Issue
Block a user