Additional Check for the file

This commit is contained in:
SamBrishes 2020-05-14 17:59:29 +02:00
parent 3dca6efcdc
commit 2e486f6d33
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
jQuery(document).ready(function($) { jQuery(document).ready(function($) {
$('#backupFile').change(function() { $('#backupFile').change(function() {
var file = this.files.length >= 1? this.files[0]: null; var file = this.files.length >= 1? this.files[0]: null;
if (file === null) {
return false;
}
// Build Form Data // Build Form Data
var url = $('#jsform').attr("action") || window.location.href; var url = $('#jsform').attr("action") || window.location.href;