mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
fix error handling for failed asset upload
This commit is contained in:
parent
7aac2e6916
commit
b80f3fbd7b
1 changed files with 3 additions and 2 deletions
|
@ -349,7 +349,7 @@ ScrollingWindow {
|
|||
},
|
||||
function(err, path) {
|
||||
print(err, path);
|
||||
if (!err) {
|
||||
if (err === "") {
|
||||
uploadProgressLabel.text = "Upload Complete";
|
||||
timer.interval = 1000;
|
||||
timer.repeat = false;
|
||||
|
@ -362,11 +362,12 @@ ScrollingWindow {
|
|||
console.log("Asset Browser - finished uploading: ", fileUrl);
|
||||
reload();
|
||||
} else {
|
||||
if (err > 0) {
|
||||
if (err !== -1) {
|
||||
console.log("Asset Browser - error uploading: ", fileUrl, " - error ", err);
|
||||
var box = errorMessageBox("There was an error uploading:\n" + fileUrl + "\n" + Assets.getErrorString(err));
|
||||
box.selected.connect(reload);
|
||||
}
|
||||
|
||||
uploadSpinner.visible = false;
|
||||
uploadButton.enabled = true;
|
||||
uploadOpen = false;
|
||||
|
|
Loading…
Reference in a new issue