Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
indiscale-files-ui-react
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
indiscale-files-ui-react
Commits
340a8517
Commit
340a8517
authored
2 years ago
by
Jose Manuel Serrano Amaut
Browse files
Options
Downloads
Patches
Plain Diff
[REF]: Add onUploadFinish and onUploadStart methods to advanced dropzone example
parent
0f34d077
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/demo-components/dropzone-demo/AdvancedDropzoneDemo.jsx
+9
-8
9 additions, 8 deletions
...ts/demo-components/dropzone-demo/AdvancedDropzoneDemo.jsx
with
9 additions
and
8 deletions
src/components/demo-components/dropzone-demo/AdvancedDropzoneDemo.jsx
+
9
−
8
View file @
340a8517
...
...
@@ -6,7 +6,6 @@ import {
FullScreen
,
ImagePreview
,
VideoPreview
,
}
from
"
../../../files-ui
"
;
import
{
useEffect
,
useState
}
from
"
react
"
;
import
axios
from
"
axios
"
;
...
...
@@ -21,12 +20,12 @@ export default function AdvancedDropzoneDemo() {
const
updateFiles
=
(
incommingFiles
)
=>
{
console
.
log
(
"
incomming extFiles
"
,
incommingFiles
);
const
arrExtFIleInstances
=
incommingFiles
.
map
(
const
arrExtFIleInstances
=
incommingFiles
.
map
(
(
extFile
)
=>
new
ExtFileInstance
(
extFile
)
);
console
.
log
(
"
incomming arrExtFIleInstances
"
,
arrExtFIleInstances
);
/* const listExtFileObjects = arrExtFIleInstances.map((extFileInstance) =>
/* const listExtFileObjects = arrExtFIleInstances.map((extFileInstance) =>
extFileInstance.toExtFile()
);
...
...
@@ -40,11 +39,12 @@ export default function AdvancedDropzoneDemo() {
const
handleSee
=
(
imageSource
)
=>
{
setImageSrc
(
imageSource
);
};
/* const onClean = () => {
setExtFiles(extFiles.filter((ef) => ef.valid !== false));
}; */
const
handleStart
=
(
res
)
=>
{
console
.
log
(
"
advanced demo start upload
"
,
res
);
};
const
handleFinish
=
(
res
)
=>
{
console
.
log
(
"
finish
"
,
res
);
console
.
log
(
"
advanced demo finish upload
"
,
res
);
};
const
handleWatch
=
(
videoSource
)
=>
{
console
.
log
(
...
...
@@ -106,6 +106,7 @@ export default function AdvancedDropzoneDemo() {
//url: "http://localhost:2800/file/28048465460",
cleanOnUpload
:
true
,
}
}
onUploadStart
=
{
handleStart
}
onUploadFinish
=
{
handleFinish
}
//fakeUpload
actionButtons
=
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment