python - Manipulating Azure storage containers in a Djano project -
in django project, i'm uploading video files azure storage via following snippet:
content_str = content.read() blob_service.put_blob( 'videos', name, content_str, x_ms_blob_type='blockblob', x_ms_blob_content_type=content_type, x_ms_blob_cache_control ='public, max-age=3600, s-maxage=86400' ) where name random uuid string , videos name of container. how upload video files without specifying container, i.e. de facto creating unique container every file upload?
how upload video files without specifying container, i.e. de facto creating unique container every file upload?
each blob (a video file in case) must belong container. create container using blob_service.create_container before call blob_service.put_blob. can name container uuid.
Comments
Post a Comment