Include the document details when reutnring a file from the file model. Improve the validation of file form elements.