Skip to content

Commit 617e807

Browse files
committed
Simpler instructions
1 parent 59106e5 commit 617e807

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,9 @@ dev:
6565
You'll have to create the container before you can start uploading files.
6666
You 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.
8371
Container names can't have any special characters, or you'll get an error.
8472

8573
## Standalone

0 commit comments

Comments
 (0)