Skip to content

Commit

Permalink
the image that is dropped also shows the filename
Browse files Browse the repository at this point in the history
  • Loading branch information
sirilius committed Jul 25, 2022
1 parent 7b99573 commit a416bbf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/_includes/js/watermark.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ function dropHandler(ev) {
for (const item of ev.dataTransfer.items) {
if (item.kind === "file") {
const file = item.getAsFile();
inputFile.nextElementSibling.innerHTML = `<span id="file-name">${file.name}</span>`;

if (file.type.includes("image/")) {
reader.readAsDataURL(file);
Expand Down

0 comments on commit a416bbf

Please sign in to comment.