Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
6a9b583b
Commit
6a9b583b
authored
Dec 08, 2021
by
guxukai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.5.0_fix' into '2.5.0'
fix: 上传限制1m See merge request
!1
parents
49ef0dce
78845bee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
workspace.ts
libs/remix-ui/workspace/src/lib/actions/workspace.ts
+4
-1
No files found.
libs/remix-ui/workspace/src/lib/actions/workspace.ts
View file @
6a9b583b
...
@@ -266,6 +266,10 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
...
@@ -266,6 +266,10 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
if
(
if
(
file
.
type
===
'application/zip'
file
.
type
===
'application/zip'
)
{
)
{
if
(
file
.
size
/
1024
>
1024
)
{
return
dispatch
(
displayNotification
(
'File Upload Failed'
,
'压缩文件大于1M'
,
'Close'
,
null
,
async
()
=>
{
}))
}
return
await
iterator
(
await
unZipFile
(
file
))
return
await
iterator
(
await
unZipFile
(
file
))
}
}
const
workspaceProvider
=
plugin
.
fileProviders
.
workspace
const
workspaceProvider
=
plugin
.
fileProviders
.
workspace
...
@@ -293,7 +297,6 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
...
@@ -293,7 +297,6 @@ export const uploadFile = async (target, targetFolder: string, cb?: (err: Error,
cb
&&
cb
(
null
,
true
)
cb
&&
cb
(
null
,
true
)
}
}
const
name
=
`
${
targetFolder
}
/
${
isFolder
?
file
.
webkitRelativePath
:
file
.
name
}
`
const
name
=
`
${
targetFolder
}
/
${
isFolder
?
file
.
webkitRelativePath
:
file
.
name
}
`
workspaceProvider
.
exists
(
name
).
then
(
exist
=>
{
workspaceProvider
.
exists
(
name
).
then
(
exist
=>
{
if
(
!
exist
)
{
if
(
!
exist
)
{
loadFile
(
name
)
loadFile
(
name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment