Skip to content

Commit

Permalink
Basic multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
chigozienri committed Jun 7, 2024
1 parent 39c3120 commit 8082fab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
<input type="number" id="nuclei_threshold" name="nuclei_threshold" value="4" step="0.01"><br><br>
</div>
</form>
<input type="file" id="imageUpload" accept="image/*" />
<input type="number" id="fileNumber" value="0" step="1"/>
<input type="file" id="imageUpload" accept="image/*" multiple="true"/>
<button id="reanalyse" style="display: none">Reanalyse with current parameters</button>
</div>
<button id="downloadZip" style="display: none;">Download Zip</button>
Expand Down Expand Up @@ -162,7 +163,8 @@
attempts++;
}
if (imageUpload.files.length > 0) {
const file = imageUpload.files[0];
let fileNumber = document.querySelector("#fileNumber");
const file = imageUpload.files[fileNumber.value];
const reader = new FileReader();
reader.onload = async (e) => {
const data = new Uint8Array(e.target.result);
Expand Down

0 comments on commit 8082fab

Please sign in to comment.