mirror of https://github.com/dapr/docs.git
commit
5a91b55bcd
|
@ -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.
|
||||
|
||||
|
|
|
@ -118,4 +118,4 @@ Welcome to the Dapr documentation site!
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
@ -35,7 +35,7 @@ spec:
|
|||
version: v1
|
||||
metadata:
|
||||
- name: secretsFile
|
||||
value: <PATH TO SECRETS FILE>/secrets.json
|
||||
value: <PATH TO SECRETS FILE>/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:
|
||||
|
|
|
@ -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:<dapr-port>/v1.0/bindings/<binding-name>
|
||||
```
|
||||
|
||||
**Saving to a specific file**
|
||||
|
||||
```bash
|
||||
curl -d "{ \"operation\": \"create\", \"data\": \"Hello World\", \"metadata\": { \"blobName\": \"my-test-file.txt\" } }" \
|
||||
http://localhost:<dapr-port>/v1.0/bindings/<binding-name>
|
||||
```
|
||||
|
||||
**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: <NAME>
|
||||
namespace: <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:<dapr-port>/v1.0/bindings/<binding-name>
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue