$formNewfileBinary[0].addEventListener('submit', async function(ev) {
ev.preventDefault();
if($formNewfileBinary[0].checkValidity() === false) {
window.gitlist.invalidSnackbarCommit()
return;
}
try {
// http://php.net/manual/en/features.file-upload.php#114004
const inputs = window.gitlist.commitModelInputs['new-binary']
const json = await window.gitlist.gitHelperAjax({
upload: true,
modal: $buttonNewBinaryModal,
action: 'file-binary',
inputs: inputs,
filename: $inputNewfileBinaryFile.val(),
fileUpload: $inputNewfileBinaryUpload,
data: {
override: $inputNewfileBinaryOverride.val()
}
})
if (window.gitlist.gitNewPush(json)) {
return
}
} catch(e) {
window.gitlist.ajaxErrorHandler(e)
}
return false;
}, false);
/*
$buttonSubmitNewfileBinary.click(async () => {