method add_file_data moved from the controller(s) to the model(s)