File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 6565You'll have to create the container before you can start uploading files.
6666You can do so using Azure CLI, Azure Storage Explorer, or by running:
6767
68+ ` bin/rails runner "ActiveStorage::Blob.service.client.tap{|client| client.create_container unless client.get_container_properties.present?}.tap { |client| puts 'done!' if client.get_container_properties.present?}" `
6869
69- ```
70- bin/rails runner "
71- container_name = 'CONTAINER_NAME_REPLACE_ME'
72- require %{azure_blob}
73- AzureBlob::Client.new(
74- account_name: %{devstoreaccount1},
75- access_key: %{Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==},
76- host: %{http://127.0.0.1:10000/devstoreaccount1},
77- container: container_name)
78- .tap{|container| container.create_container unless container.get_container_properties.present?}
79- .tap{|container| puts 'done!' if container.get_container_properties.present?}"
80- ```
81-
82- Replace ` CONTAINER_NAME_REPLACE_ME ` with your container name.
70+ Make sure that ` config.active_storage.service = :dev ` is set to your azurite configuration.
8371Container names can't have any special characters, or you'll get an error.
8472
8573## Standalone
You can’t perform that action at this time.
0 commit comments