# Azure Blob

This guide explains how to connect **Azure Storage** to the Weekerp API.

It includes the full process of creating credentials and registering them in Weekerp.

#### Required information for connection

To allow Weekerp to access your images, you need to provide the following:

* account key
* account name
* container name

#### Getting credentials (Azure)

1. Go to Azure Portal → **Storage accounts → Create** (create a Storage account)
2. Select the created Storage account **→ Security + networking → Access keys → key1 → Copy** (Account Key)
3. Select the created Storage account → **Data storage → Containers → Add container → Create** (Container Name)
4. Log in to Weekerp → **Sources → Add Source → Microsoft Azure Storage**
5. Enter Account Name / **Account Key / Container Name** in Weekerp → **Next → Enter Alias → Create**

#### Below is the same guide shown as step-by-step screenshots.

#### 1. In Azure Portal, search for “Storage accounts”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FI7SjuzKlmbaJDdywyNJG%2F1.png?alt=media&#x26;token=c18330d7-fc8c-4606-9917-4c01161d8ce8" alt=""><figcaption></figcaption></figure>

#### 2. Click “Create”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FQUZrOLu62MedB51OI5j6%2F2.png?alt=media&#x26;token=db5b0ab6-b7ca-438e-89d4-55ca52a1a3a5" alt=""><figcaption></figcaption></figure>

#### 3. Create a Storage account

1. Enter the account name
2. Click “Review + create” at the bottom

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FAaTqM03ELhoORosOYC9C%2F3.png?alt=media&#x26;token=88242852-27d4-4729-899d-3ca47bbdca21" alt=""><figcaption></figcaption></figure>

#### 4. Click “Create” at the bottom

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2Faugb1IKaTtFTb0AL601t%2F4.png?alt=media&#x26;token=7954f7b2-93ee-4417-89dc-3f7aaac8dacb" alt=""><figcaption></figcaption></figure>

#### 5. Issue an access key — search and open Storage accounts

1. Search for “Storage accounts”
2. Click the Storage accounts search result

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FjfRVaWnncndd2o8TcB3W%2F5.png?alt=media&#x26;token=e8cc8fa4-4775-4c33-9002-ab7602f91856" alt=""><figcaption></figcaption></figure>

#### 6. Click the Storage account you created

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2F3TBoSBmUtDBxY2XZPgHt%2F6.png?alt=media&#x26;token=3c9a64f5-ae90-4f98-8c97-38c21e636413" alt=""><figcaption></figcaption></figure>

#### 7. Open Access keys

1. In the left navigation, click “Security + networking”
2. Click “Access keys”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FregclPDfrMqUkyQ4Be3Z%2F7.png?alt=media&#x26;token=0d4c1117-849c-4984-bf16-cadfd95af0f0" alt=""><figcaption></figcaption></figure>

#### 8. View the Access Key

1. Locate “key1”
2. Click the “Show” button

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FV00efCqk6qJnfhA8bwep%2F8.png?alt=media&#x26;token=09760fb9-c2f8-464d-8264-b20ee0d2095b" alt=""><figcaption></figcaption></figure>

#### 9. Copy the Access Key

1. Confirm the key value
2. Copy it to clipboard

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FmDmNGpMOiZs66Q4oLc34%2F9.png?alt=media&#x26;token=ce875404-437b-4c46-b857-2a863b9a6014" alt=""><figcaption></figcaption></figure>

#### 10. Verify the key format

A copied key looks like this:

```
mu1L4j9LQL4uwoai20+fFD6dE6Z0JCU0KYmgpooyuEDz/1GJWwirCzrokVXjCqRBeFuoIPXsBgTH+AStC6O0qw==
```

#### 11. Create storage container — search for “Storage accounts” in Azure Portal

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FZOwd3lk4tTTadGOH76Lq%2F11.png?alt=media&#x26;token=4c7f5771-45e3-4ecf-927d-c462be3641db" alt=""><figcaption></figcaption></figure>

#### 12. Select the Storage account

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FNn8d8ZxK2JtAcAtNZTVJ%2F12.png?alt=media&#x26;token=c610ab7c-2ce3-4f29-95c5-6d1b259608a6" alt=""><figcaption></figcaption></figure>

#### 13. Open Containers

1. In the left navigation, click “Data storage”
2. Click “Containers”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FLUyScrnyFSyy7l9dLOPt%2F13.png?alt=media&#x26;token=0e3c176b-fc84-4840-a8ff-cf6a96ddf608" alt=""><figcaption></figcaption></figure>

#### 14. Click “Add container”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FhJFdsxWzPX7hQpr4Lqge%2F14.png?alt=media&#x26;token=0d1855d8-a08d-40c0-ab30-dcd109ac59c8" alt=""><figcaption></figcaption></figure>

#### 15. Enter the container name and create it

1. Enter the container name
2. Click “Create” at the bottom

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FcTKGmqGXI6HnYGNdMHHO%2F15.png?alt=media&#x26;token=db63f876-69ec-4b46-be9c-3b4b75c20e19" alt=""><figcaption></figcaption></figure>

#### 16. Verify the container name — search for “Storage accounts” in Azure Portal

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2F5IF01Y1OlSpfTX0vzDoi%2F16.png?alt=media&#x26;token=87fbf0bb-d7b4-48f9-9759-f5470c5d2116" alt=""><figcaption></figcaption></figure>

#### 17. Click the Storage Account you want to connect

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FgPxZuIUMtJtb4UsFuELO%2F17.png?alt=media&#x26;token=f39f882a-f3c5-4db1-9da7-008253d5e8fd" alt=""><figcaption></figcaption></figure>

#### 18. Open Containers

1. In the left navigation, click “Data storage”
2. Click “Containers”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2F4yPcUllDN8TVNqfQt0bT%2F18.png?alt=media&#x26;token=1efac272-8fcb-4b55-a610-4b8db07859ea" alt=""><figcaption></figcaption></figure>

#### 19. Confirm the target container name

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FJI0FnWSpSt9GzkldHYdD%2F19.png?alt=media&#x26;token=ce0e1ac1-b6be-477d-a172-3cd47bf6f5b9" alt=""><figcaption></figcaption></figure>

#### 20. You should have the following information ready

1. Account Name (Step #6, Step #17)
2. Account Key : (Step #9)
3. Container Name (Step #19)

#### 21. In Weekerp, click “Add Source” at the top-right

1. [Log in to Weekerp](https://weekerp.com/space/callback)
2. Click the “Source” tab
3. Click “Add Source”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FsbcYLVQwIQNFlRFVX7nl%2F21.png?alt=media&#x26;token=5d172477-86ef-4faa-8899-ebbbaede5870" alt=""><figcaption></figcaption></figure>

#### 22. Select “Microsoft Azure Storage”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2F8keMlM3gRcqv4bggQ1UZ%2F22.png?alt=media&#x26;token=257522ff-6579-4abb-be53-47faea6efe83" alt=""><figcaption></figcaption></figure>

#### 23. Enter credential information

1. Enter Account Name
2. Enter Account Key
3. Enter Container Name
4. Click “Next”

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FpfKCOMnbS3nWsQGFu1Px%2F23.png?alt=media&#x26;token=f51ee1f8-8a4b-443b-859b-48fbc3ff26a3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
BasePath sets the root directory for origin requests.
{% endhint %}

If files are stored like below, BasePath can be set to `/` or `/assets`.

* /dog.jpg
* /assets/cat.png

**Request example**

* `cdn.weekerp.com/image/{alias}/dog.jpg`

**Origin request**

* **With BasePath set:** <https://static.example.com/**`assets`**/dog.jpg>
* **Without BasePath:** <https://static.example.com/dog.jpg>

For more details, please refer to [basepath](https://weekerp.gitbook.io/image/storage/basepath "mention").

#### 24. Enter the source alias (alias)

1. Enter the alias you want to use
2. Create the alias

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2FjM7mpuWGjxtw8IsTFtaW%2F24.png?alt=media&#x26;token=4e1c018a-d1c6-45e9-9636-23b1096e86b7" alt=""><figcaption></figcaption></figure>

#### 25. Verify the created data source

<figure><img src="https://2148242329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxGV4or1Scr0ygVH4EZcP%2Fuploads%2Fso1ajxg0WI0HaNX2hbcH%2F25.png?alt=media&#x26;token=4dd50d20-e924-46d1-bf7b-8396ee1c467a" alt=""><figcaption></figcaption></figure>

#### Use it like this:

cdn.weekerp.com/<mark style="color:red;">`image`</mark>/`weekerp-assets`/dog.jpg

cdn.weekerp.com/<mark style="color:red;">`image`</mark>/`weekerp-assets`/dog.jpg?ai=Rotate the image to the right

cdn.weekerp.com/<mark style="color:red;">`video`</mark>/`weekerp-assets`/test-video.mp4

All settings are complete.

Typically, it takes 5–10 minutes to propagate the connection across all global environments.
