def upload_local_artifacts(resource_id, resource_dict, property_name, parent_dir, uploader):
 local_path = resource_dict.get(property_name, None)
 if (local_path is None):
  local_path = parent_dir
 if is_s3_url(local_path):
  LOG.debug('Property {0} of {1} is already a S3 URL'.format(property_name, resource_id))
  return local_path
 local_path = make_abs_path(parent_dir, local_path)
 if is_local_folder(local_path):
  return zip_and_upload(local_path, uploader)
 elif is_local_file(local_path):
  return uploader.upload_with_dedup(local_path)
 raise exceptions.InvalidLocalPathError(resource_id=resource_id, property_name=property_name, local_path=local_path)

def upload_local_artifacts ( resource_id , resource_dict , property_name , parent_dir , uploader ) : local_path = resource_dict . get ( property_name , None ) if ( local_path is None ) : local_path = parent_dir if is_s3_url ( local_path ) : LOG . debug ( 'Property {0} of {1} is already a S3 URL' . format ( property_name , resource_id ) ) return local_path local_path = make_abs_path ( parent_dir , local_path ) if is_local_folder ( local_path ) : return zip_and_upload ( local_path , uploader ) elif is_local_file ( local_path ) : return uploader . upload_with_dedup ( local_path ) raise exceptions . InvalidLocalPathError ( resource_id = resource_id , property_name = property_name , local_path = local_path )
upload local artifacts referenced by the property at given resource and return s3 url of the uploaded object .