Avoid image table updates on file upload failure

* If the publish() call did not really do anything, then there is
  no use in saving the page and file DB records. Previously the
  user would get an error but the description page would be made.

bug: 64071
Change-Id: I1959f8c1ef33dbd1b238f6020117d2862d4b0fd3
(cherry picked from commit 17480be012a9b0f331ff776832ddf865595f13e7)