Fix document upload
Create custom field to store revision files
Fix file field url
Update document when metadata is modified