2021-02-28 11:46:00 -05:00
|
|
|
# Azure Blob Storage
|
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
You can use [Microsoft Azure Blob Storage][azure] to handle your image uploads in HedgeDoc.
|
2021-02-28 11:46:00 -05:00
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
All you need to do is to get the [connection string][connection-string] for your storage account
|
|
|
|
and create a storage container with public access set to 'blob'.
|
2021-02-28 11:46:00 -05:00
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
It's possible to create the container with the [Azure CLI][azure-cli], using your connection string,
|
|
|
|
with the following command:
|
2021-02-28 11:46:00 -05:00
|
|
|
|
2023-07-05 20:45:32 -04:00
|
|
|
<!-- markdownlint-disable line-length -->
|
2023-07-02 16:31:04 -04:00
|
|
|
```shell
|
2023-07-05 20:45:32 -04:00
|
|
|
az storage container create --name <NAME> --public-access blob--connection-string "<CONNECTION_STRING>"
|
2021-02-28 11:46:00 -05:00
|
|
|
```
|
2023-07-05 20:45:32 -04:00
|
|
|
<!-- markdownlint-enable line-length -->
|
2021-02-28 11:46:00 -05:00
|
|
|
|
|
|
|
You can of course also create the container in the Azure portal if you prefer.
|
|
|
|
|
|
|
|
Then you just add the following lines to your configuration:
|
2023-07-05 20:45:32 -04:00
|
|
|
(with the appropriate substitution for `<CONNECTION_STRING>` and `<NAME>` of course)
|
|
|
|
|
|
|
|
```dotenv
|
2021-02-28 11:46:00 -05:00
|
|
|
HD_MEDIA_BACKEND="azure"
|
|
|
|
HD_MEDIA_BACKEND_AZURE_CONNECTION_STRING="<CONNECTION_STRING>"
|
|
|
|
HD_MEDIA_BACKEND_AZURE_CONTAINER="<NAME>"
|
|
|
|
```
|
2023-07-05 20:45:32 -04:00
|
|
|
|
|
|
|
[azure]: https://azure.microsoft.com/services/storage/blobs/
|
|
|
|
[connection-string]: https://docs.microsoft.com/azure/storage/common/storage-account-keys-manage
|
|
|
|
[azure-cli]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
|