Skip to content

Commit

Permalink
Images explained
Browse files Browse the repository at this point in the history
  • Loading branch information
kompoth committed Apr 2, 2024
1 parent 4f9016d commit 2868f09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ <h2>Issue creation</h2>

<fieldset>
<legend>Images <!--span id="image-number-tracker">(0/4)</span--></legend>
<p>
Upload an image and insert its tag <code>![Image caption](image-name.png)</code> anywhere in the text.
Image must not be larger than 2MB.
</p>
<ul id="attached-images-list"></ul>
<!--button type="button" id="add-image-button" onclick="document.getElementById('image-input').click();">Add image</button-->
<input type="file" id="image-input" accept="image/png,image/jpg,image/jpeg" onchange="updateImageList();"/>
Expand Down
2 changes: 1 addition & 1 deletion static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function updateImageList() {
*/
const file = imageInput.files[0];
if (file && file.size > 2 * 1024 * 1024) {
alert("Too chunky! Please attach a file that weights less than 2 MB.");
alert("Too chunky! Please attach a file that weights less than 2MB.");
imageInput.value = null;
}
}
Expand Down

0 comments on commit 2868f09

Please sign in to comment.