renamed file to upload
changed all references to file to upload
fixed the document layout again
reflect changes of the renaming of file table
added dependent destroy on its has many relation