Skip to content
Snippets Groups Projects
Commit 037f5dbe authored by Jose Manuel Serrano Amaut's avatar Jose Manuel Serrano Amaut
Browse files

[REF]: Improved code in advanced dropzone example for testing upload

parent 5797c2d0
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,16 @@ export default function AdvancedDropzoneDemo() {
}
}
const handleAbort = (id) => {
// alert(id);
setExtFiles(
extFiles.map((ef) => {
if (ef.id === id) {
return { ...ef, uploadStatus: "aborted" };
} else return { ...ef };
})
);
};
const handleCancel= (id) => {
// alert(id);
setExtFiles(
extFiles.map((ef) => {
......@@ -107,6 +117,7 @@ export default function AdvancedDropzoneDemo() {
onSee={handleSee}
onWatch={handleWatch}
onAbort={handleAbort}
onCancel={handleCancel}
resultOnTooltip
alwaysActive
preview
......
......@@ -41,11 +41,12 @@ const DropzoneMainPage = ({ darkMode = false }) => {
// minHeight="400px"
onChange={updateFiles}
value={files}
maxFileSize={28*1024}
maxFileSize={28 * 1024 * 10}
maxFiles={5}
accept=".jpg, .png, application/json, video/*"
fakeUpload
behaviour="add"
uploadConfig={{ autoUpload: true , url:"fdbd"}}
//uploadConfig={{ autoUpload: true, url:"fdbd" }}
>
{files.length > 0 &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment