HomePhabricator

mw.Upload.BookletLayout: Move error checking for uploadToStash to uploadFile

Description

mw.Upload.BookletLayout: Move error checking for uploadToStash to uploadFile

We were checking for uploadToStash errors in saveFile, instead of in
uploadFile itself. Apart from being just wrong it was causing two
issues:

  1. We would show an upload error until after you've tried to save the file.
  1. If there was an error in saving, and you try again, the first thing it would do is check mw.Upload.State to hopefully check for uploadToStash errors. Instead of running the finishStashUpload again it would fail because of the earlier error, thus making all errors unrecoverable.

Bug: T114130
Change-Id: I56f4ef6e6536840a63402688eb2a1875a6876fcc