use static js

This commit is contained in:
2022-11-04 17:55:25 -07:00
parent dcf78bb88d
commit fa1e988344
6 changed files with 31 additions and 35 deletions

View File

@@ -1,4 +1,8 @@
{% extends "base.html" %}
{% block head %}
{% endblock %}
{% block content %}
<form action="/ratio_pyro" method="POST" enctype="multipart/form-data">
<h2>Ratio Pyrometry Interface</h2>
@@ -58,17 +62,7 @@
<input type="submit" value="Generate Heatmap"/>
</form>
<!-- <script src="/img_preview.js" onload="setOnChange()"></script> -->
<script>
let imgPreview = document.getElementById('img-preview');
let imgUpload = document.getElementById('img-upload');
imgUpload.onchange = event => {
const [file] = imgUpload.files;
if (file) {
console.log(file)
imgPreview.src = URL.createObjectURL(file);
}
};
</script>
<!-- Image Preview -->
<script src="/s/js/img_preview.js"></script>
{% endblock %}