Skip to content

Commit

Permalink
Disable upload button while predicting (#11)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ajbozarth authored Aug 29, 2018
1 parent ef3d93d commit 4bf5fb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions static/js/webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ $(function() {

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

// Perform file upload
$.ajax({
Expand All @@ -181,6 +182,7 @@ $(function() {
},
complete: function() {
$('#file-submit').text('Submit');
$('#file-submit').prop('disabled', false);
$('#file-input').val('');
},
});
Expand Down

0 comments on commit 4bf5fb2

Please sign in to comment.