get rid of ext in documents upload
check if the file exists before putting the url (mostly for tests)