Merge pull request #288 from mozilla/uploads

fix: Don`t allow upload when not on the upload page.
This commit is contained in:
Danny Coates 2017-07-24 10:30:52 -07:00 committed by GitHub
commit 9136694d29
1 changed files with 6 additions and 0 deletions

View File

@ -133,6 +133,12 @@ $(document).ready(function() {
// on file upload by browse or drag & drop
function onUpload(event) {
event.preventDefault();
// don't allow upload if not on upload page
if ($('#page-one').attr('hidden')){
return;
}
storage.totalUploads += 1;
let file = '';