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
Merge "Avoid image table updates on file upload failure"