use static js
This commit is contained in:
3
static/js/csv_download.js
Normal file
3
static/js/csv_download.js
Normal file
@@ -0,0 +1,3 @@
|
||||
function saveCsv(csvString) {
|
||||
|
||||
}
|
||||
9
static/js/img_preview.js
Normal file
9
static/js/img_preview.js
Normal file
@@ -0,0 +1,9 @@
|
||||
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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user