diff --git a/datastore/blob/azure_storage_api/__init__.py b/datastore/blob/azure_storage_api/__init__.py index 25230685..d7b84994 100644 --- a/datastore/blob/azure_storage_api/__init__.py +++ b/datastore/blob/azure_storage_api/__init__.py @@ -50,7 +50,7 @@ async def generate_hash(image): print(error.__str__()) raise Exception("Unhandeled Datastore.blob.azure_storage Error") -async def build_container_name(name:str,tier:str="user"): +def build_container_name(name:str,tier:str="user"): """ This function builds the container name based on the tier and the name. We include a tier to better structure the container names in the future. Other tiers could be 'dev' or 'test-user' @@ -62,6 +62,16 @@ async def build_container_name(name:str,tier:str="user"): return "{}-{}".format(tier, name) +def build_blob_name(folder_name, image_uuid): + """ + This function builds the blob name based on the folder name and the image uuid + + Parameters: + - folder_name (str): the name of the folder or the path to the folder + - image_uuid (str): the uuid of the image + """ + return "{}/{}".format(folder_name, image_uuid) + async def mount_container( connection_string, container_uuid,