feat: 下载page到本地
This commit is contained in:
@@ -6,6 +6,7 @@ export const getContentType = (filePath: string) => {
|
||||
'.html': 'text/html',
|
||||
'.js': 'text/javascript',
|
||||
'.css': 'text/css',
|
||||
'.txt': 'text/plain',
|
||||
'.json': 'application/json',
|
||||
'.png': 'image/png',
|
||||
'.jpg': 'image/jpg',
|
||||
@@ -13,6 +14,7 @@ export const getContentType = (filePath: string) => {
|
||||
'.svg': 'image/svg+xml',
|
||||
'.wav': 'audio/wav',
|
||||
'.mp4': 'video/mp4',
|
||||
'.zip': 'application/octet-stream',
|
||||
};
|
||||
return contentType[extname] || 'application/octet-stream';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user