def handle_file_upload(path, file, site):
 uploadedfile = None
 try:
  file_path = os.path.join(path, file.name)
  uploadedfile = site.storage.save(file_path, file)
 except Exception as inst:
  raise inst
 return uploadedfile

def handle_file_upload ( path , file , site ) : uploadedfile = None try : file_path = os . path . join ( path , file . name ) uploadedfile = site . storage . save ( file_path , file ) except Exception as inst : raise inst return uploadedfile
handle file upload .