Skip to content

Commit fd8f0e8

Browse files
authored
Merge pull request #2950 from Bima42/fix/2949-upload-in-dropzone-two-times-in-a-row
fix: clear input value after uploading file in dropzone
2 parents 4f2268e + 8aa496b commit fd8f0e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

apps/dokploy/components/ui/dropzone.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ export const Dropzone = React.forwardRef<HTMLDivElement, DropzoneProps>(
6767
ref={inputRef}
6868
type="file"
6969
className={cn("hidden", className)}
70-
onChange={(e: ChangeEvent<HTMLInputElement>) =>
71-
onChange(e.target.files)
72-
}
70+
onChange={(e: ChangeEvent<HTMLInputElement>) => {
71+
onChange(e.target.files);
72+
e.target.value = "";
73+
}}
7374
/>
7475
</div>
7576
</CardContent>

0 commit comments

Comments
 (0)