def move_upload(pub, file_path, file_name, meta_data=None): upload = new_upload(pub, file_name, meta_data) shutil.move(file_path, upload.file_path) upload.status = "Queued for processing" upload.save() return upload