mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-16 23:12:54 +00:00
fix
This commit is contained in:
parent
4f0d19dbc4
commit
73ebb96171
3 changed files with 23 additions and 16 deletions
|
@ -328,17 +328,18 @@ document.addEventListener('DOMContentLoaded', function(){
|
|||
|
||||
let formdata = new FormData();
|
||||
formdata.append("file", this.inputFile);
|
||||
|
||||
translateFileRequest.send(formdata);
|
||||
formdata.append("source", this.sourceLang);
|
||||
formdata.append("target", this.targetLang);
|
||||
|
||||
this.loadingFileTranslation = true
|
||||
|
||||
translateFileRequest.onreadystatechange = function () {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
translateFileRequest.onload = () => {
|
||||
if (translateFileRequest.readyState === 4 && translateFileRequest.status === 200) {
|
||||
this.loadingFileTranslation = false
|
||||
}
|
||||
}
|
||||
|
||||
translateFileRequest.send(formdata);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue