mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 06:10:54 +03:00
WebClient: prevent uploads if no file is selected
Fixes #1980 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1981,6 +1981,17 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
||||
var playerKeepAlive;
|
||||
|
||||
function uploadFiles(files) {
|
||||
if (files.length == 0) {
|
||||
ModalAlert.fire({
|
||||
text: $.t('fs.upload_no_files'),
|
||||
icon: "warning",
|
||||
confirmButtonText: $.t('general.ok'),
|
||||
customClass: {
|
||||
confirmButton: "btn btn-primary"
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
keepAlive();
|
||||
let keepAliveTimer = setInterval(keepAlive, keepAliveInterval);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user