diff --git a/README.md b/README.md index aafd1edab..5cb6b94ed 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ The following branches are currently maintained: | Branch | Website | Description | |--------|---------|-------------| | [v0.11](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. -| [v1.0-rc2](https://github.com/dapr/docs/tree/v1.0-rc2) | https://v1-rc2.docs.dapr.io/ | Latest Dapr release candidate release documentation. Doc updates that are only applicable to v1.0-rc2+ go here. -| [v1.0-rc3](https://github.com/dapr/docs/tree/v1.0-rc3) (pre-release) | https://v1-rc3.docs.dapr.io/ | Pre-release release candidate documentation. Doc updates that are only applicable to v1.0-rc3+ go here. +| [v1.0-rc3](https://github.com/dapr/docs/tree/v1.0-rc3) | https://v1-rc3.docs.dapr.io/ | Latest Dapr release candidate release documentation. Doc updates that are only applicable to v1.0-rc2+ go here. +| [v1.0](https://github.com/dapr/docs/tree/v1.0) (pre-release) | https://v1-0.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.0+ go here. For more information visit the [Dapr branch structure](https://docs.dapr.io/contributing/contributing-docs/#branch-guidance) document. diff --git a/daprdocs/content/en/_index.md b/daprdocs/content/en/_index.md index 4617986e2..670b9c74e 100644 --- a/daprdocs/content/en/_index.md +++ b/daprdocs/content/en/_index.md @@ -118,4 +118,4 @@ Welcome to the Dapr documentation site! -
\ No newline at end of file +
diff --git a/daprdocs/content/en/developing-applications/building-blocks/secrets/howto-secrets.md b/daprdocs/content/en/developing-applications/building-blocks/secrets/howto-secrets.md index c27b89383..01536bd18 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/secrets/howto-secrets.md +++ b/daprdocs/content/en/developing-applications/building-blocks/secrets/howto-secrets.md @@ -35,7 +35,7 @@ spec: version: v1 metadata: - name: secretsFile - value: /secrets.json + value: /mysecrets.json - name: nestedSeparator value: ":" ``` @@ -48,7 +48,7 @@ To configure a different kind of secret store see the guidance on [how to config Now run the Dapr sidecar (with no application) ```bash -dapr run --app-id my-app --port 3500 --components-path ./components +dapr run --app-id my-app --dapr-http-port 3500 --components-path ./components ``` And now you can get the secret by calling the Dapr sidecar using the secrets API: diff --git a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md index 02a38eac2..5df555368 100644 --- a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md @@ -40,20 +40,62 @@ The above example uses secrets as plain strings. It is recommended to use a secr To perform a create blob operation, invoke the Azure Blob Storage binding with a `POST` method and the following JSON body: +> Note: by default, a random UUID is generated. See below for Metadata support to set the name + ```json { "operation": "create", - "data": { - "field1": "value1" - } + "data": "YOUR_CONTENT" } ``` #### Example: -```bash +> We escape since ' is not supported on Windows +> On Windows, utilize CMD (PowerShell has different escaping mechanism) -curl -d '{ "operation": "create", "data": { "field1": "value1" }}' \ +**Saving to a random generated UUID file** + +```bash +curl -d "{ \"operation\": \"create\", \"data\": \"Hello World\" }" \ + http://localhost:/v1.0/bindings/ +``` + +**Saving to a specific file** + +```bash +curl -d "{ \"operation\": \"create\", \"data\": \"Hello World\", \"metadata\": { \"blobName\": \"my-test-file.txt\" } }" \ + http://localhost:/v1.0/bindings/ +``` + +**Saving a file** + +To upload a file, encode it as Base64 and let the Binding know to deserialize it: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: + namespace: +spec: + type: bindings.azure.blobstorage + version: v1 + metadata: + - name: storageAccount + value: myStorageAccountName + - name: storageAccessKey + value: *********** + - name: container + value: container1 + - name: decodeBase64 + value: "true" +``` + +Then you can upload it as you would normally: + +```bash +curl -d "{ \"operation\": \"create\", \"data\": \"YOUR_BASE_64_CONTENT\", \"metadata\": { \"blobName\": \"my-test-file.jpg\" } }" \ http://localhost:/v1.0/bindings/ ```