changing the relation with uploaded files in database