many fixes- readonly documents! Fix many null pointes, and trying to upload when weshouldn't.  We can't stop the current document action, so i simply revert it after its done.