Skip to content

Commit

Permalink
reset files input after upload
Browse files Browse the repository at this point in the history
  • Loading branch information
breeg554 committed Dec 11, 2024
1 parent 55e6d3b commit 1f67613
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/web-remix/app/components/chat/Webchat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ ${JSON.stringify(files)}
[...(e.target.files || [])].forEach((file) => {
uploadFileToCorrectInput(file);
});
e.target.value = '';
}}
/>
</label>
Expand Down
3 changes: 3 additions & 0 deletions apps/web-remix/app/components/fileUpload/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export function FileUpload({
return file;
}),
);
})
.finally(() => {
e.target.value = '';
});
});
},
Expand Down

0 comments on commit 1f67613

Please sign in to comment.