Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Don't reset file map #42

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BlazorInputFile/wwwroot/inputfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
window.BlazorInputFile = {
init: function init(elem, componentInstance) {
elem._blazorInputFileNextFileId = 0;
elem._blazorFilesById = {};

elem.addEventListener('change', function handleInputFileChange(event) {
// Reduce to purely serializable data, plus build an index by ID
elem._blazorFilesById = {};
// Reduce to purely serializable data, plus build an index by ID
var fileList = Array.prototype.map.call(elem.files, function (file) {
var result = {
id: ++elem._blazorInputFileNextFileId,
Expand Down