mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-10 21:22:35 +01:00
dealing with invalid drag and drops
This commit is contained in:
parent
fa1f0208a4
commit
a576cc0198
@ -143,6 +143,13 @@ $(document).ready(function() {
|
||||
|
||||
let file = '';
|
||||
if (event.type === 'drop') {
|
||||
if (!event.originalEvent.dataTransfer.files[0]) {
|
||||
$('.upload-window').removeClass('ondrag');
|
||||
document.l10n.formatValue('uploadValidFile').then(str => {
|
||||
alert(str);
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (
|
||||
event.originalEvent.dataTransfer.files.length > 1 ||
|
||||
event.originalEvent.dataTransfer.files[0].size === 0
|
||||
|
@ -11,6 +11,7 @@ uploadPageSizeMessage = For the most reliable operation, it’s best to keep you
|
||||
uploadPageBrowseButton = Select a file on your computer
|
||||
.title = {uploadPageBrowseButtonTitle}
|
||||
uploadPageMultipleFilesAlert = Uploading multiple files or a folder is currently not supported.
|
||||
uploadValidFile = Please drag a valid file to upload.
|
||||
|
||||
uploadPageBrowseButtonTitle = Upload file
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user