Fix modified date viewer and when a new version is uploaded update the last modified date
Check if file upload returns the same file. Remove the prev version before adding it to the model.