Closed tzarebczan closed 4 years ago
if (filePath) publishPayload.file_path = filePath;
return Lbry.publish(publishPayload)
.then((response) => {
if (!useLBRYUploader) {
return success(response);
}
return LbryFirst.upload(publishPayload).then(success(response), success(response));
}, fail);
Currently what we are doing appside to get this connected to the publish workflow, is on a successful publish to lbry, we execute the lbry-first logic. The return currently always returns the success response of the lbry publish function:
return LbryFirst.upload(publishPayload).then(success(response), success(response));
@seanyesmunt please confirm, but if I just instead change it to:
return LbryFirst.upload(publishPayload).then( (r) => {success(r), fail(r)});
This would then push the error response from the upload function to the UI right?
A couple ways you could do this:
return LbryFirst.upload(publishPayload).then(success, fail);
return Lbry.publish(publishPayload)
.then((response) => {
if (!useLBRYUploader) {
return success(response);
}
return LbryFirst.upload(publishPayload).then(success));
}).catch(fail);
Thanks @seanyesmunt , added the first in.
Let's say the upload to youtube fails (for whatever reason - bandwidth, etc) - there would be no easy way to re-try it right? We don't re-upload on edits. Eventually we can give an option in the UI to reupload the file - we'd probably want to make them reselect it so it uploads the original file (vs using the file list file).
Some users have reported failures to upload to youtube, but nothing is shown in app