implemented image upload and cropping system, mostly work. it's too zoomed in and appears to be using the xy coords from the top left of the crop selector.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
const file_inputs = document.getElementsByClassName('file_input');
|
||||
const filename_displays = document.getElementsByClassName('file_input_feedback');
|
||||
|
||||
for (let i = 0; i < file_inputs.length; i++) {
|
||||
file_inputs[i].addEventListener('change', function() {
|
||||
const selected_file = event.target.files[0];
|
||||
if (selected_file)
|
||||
filename_displays[i].textContent = 'File uploaded: ' + selected_file.name;
|
||||
else
|
||||
filename_displays[i].textContent = 'No file selected.';
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user