Commit e4f484d9 authored by guxukai's avatar guxukai

fix: windows打不开压缩文件

parent 6a9b583b
......@@ -40,7 +40,8 @@ module.exports = config => {
} else {
webpackConfig.devServer = {
...webpackConfig.devServer,
hot: true
hot: true,
host: '0.0.0.0'
}
return webpackConfig
}
......
......@@ -263,8 +263,11 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
// pick that up via the 'fileAdded' event from the files module.
async function iterator (files) {
await Promise.all(Array.from(files).map(async (file: File) => {
console.log('fileType:::' + file.type)
// 'application/x-zip-compressed' win
// 'application/zip' mac
if (
file.type === 'application/zip'
file.type === 'application/zip' || file.type === 'application/x-zip-compressed'
) {
if (file.size / 1024 > 1024) {
return dispatch(displayNotification('File Upload Failed', '压缩文件大于1M', 'Close', null, async () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment