fix edit and upload of documents views