Added thumbnail, resized file functions; saved uploaded file data to Media table.