Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
c6f71586
Unverified
Commit
c6f71586
authored
May 21, 2023
by
KVOJJJin
Committed by
GitHub
May 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: event listener of file dropping (#113)
parent
b46511dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
index.tsx
web/app/components/datasets/create/file-uploader/index.tsx
+9
-7
No files found.
web/app/components/datasets/create/file-uploader/index.tsx
View file @
c6f71586
...
...
@@ -190,13 +190,15 @@ const FileUploader = ({ file, onFileUpdate }: IFileUploaderProps) => {
onChange=
{
fileChangeHandle
}
/>
<
div
className=
{
s
.
title
}
>
{
t
(
'datasetCreation.stepOne.uploader.title'
)
}
</
div
>
{
!
currentFile
&&
!
file
&&
(
<
div
ref=
{
dropRef
}
className=
{
cn
(
s
.
uploader
,
dragging
&&
s
.
dragging
)
}
>
<
span
>
{
t
(
'datasetCreation.stepOne.uploader.button'
)
}
</
span
>
<
label
className=
{
s
.
browse
}
onClick=
{
selectHandle
}
>
{
t
(
'datasetCreation.stepOne.uploader.browse'
)
}
</
label
>
{
dragging
&&
<
div
ref=
{
dragRef
}
className=
{
s
.
draggingCover
}
/>
}
</
div
>
)
}
<
div
ref=
{
dropRef
}
>
{
!
currentFile
&&
!
file
&&
(
<
div
className=
{
cn
(
s
.
uploader
,
dragging
&&
s
.
dragging
)
}
>
<
span
>
{
t
(
'datasetCreation.stepOne.uploader.button'
)
}
</
span
>
<
label
className=
{
s
.
browse
}
onClick=
{
selectHandle
}
>
{
t
(
'datasetCreation.stepOne.uploader.browse'
)
}
</
label
>
{
dragging
&&
<
div
ref=
{
dragRef
}
className=
{
s
.
draggingCover
}
/>
}
</
div
>
)
}
</
div
>
{
currentFile
&&
(
<
div
className=
{
cn
(
s
.
file
,
uploading
&&
s
.
uploading
)
}
>
{
uploading
&&
(
...
...
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