Skip to content

Commit 4bf5fb2

Browse files
authored
Disable upload button while predicting (#11)
Currently if you try uploading an image while one is already processing it will display the new image but use the canvas for the first image.
1 parent ef3d93d commit 4bf5fb2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

static/js/webapp.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ $(function() {
160160

161161
if ($('#file-input').val() !== '') {
162162
$('#file-submit').text('Detecting...');
163+
$('#file-submit').prop('disabled', true);
163164

164165
// Perform file upload
165166
$.ajax({
@@ -181,6 +182,7 @@ $(function() {
181182
},
182183
complete: function() {
183184
$('#file-submit').text('Submit');
185+
$('#file-submit').prop('disabled', false);
184186
$('#file-input').val('');
185187
},
186188
});

0 commit comments

Comments
 (0)