docs: added dividers + see also section (#2899)
This commit is contained in:
@@ -14,6 +14,8 @@ To manage images in Medusa, you need a file service plugin responsible for hosti
|
||||
|
||||
Medusa provides three different options to handle your file storage. This document focuses on using [Spaces](https://www.digitalocean.com/products/spaces) to store your Medusa server’s images.
|
||||
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Medusa Server
|
||||
@@ -24,6 +26,8 @@ A Medusa server is required to be set up before following along with this docume
|
||||
|
||||
You need to [create a DigitalOcean account](https://cloud.digitalocean.com/registrations/new) to follow along with this documentation. A credit card is required during registration.
|
||||
|
||||
---
|
||||
|
||||
## Create DigitalOcean Space
|
||||
|
||||
In your DigitalOcean account, click on the Create button at the top right, then choose Spaces from the dropdown.
|
||||
@@ -40,6 +44,8 @@ In the Finalize and Create section, enter a name for the field “Choose a uniqu
|
||||
|
||||
Once you’re done, click on the Create a Space button. This creates the Space and redirects you to the Space’s page.
|
||||
|
||||
---
|
||||
|
||||
## Create Space Access Keys
|
||||
|
||||
Choose API from the bottom of the sidebar.
|
||||
@@ -62,6 +68,8 @@ The secret access key will not be shown again after you leave the page. Make sur
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Install the Spaces Plugin
|
||||
|
||||
In the directory of your Medusa server, run the following command to install the Spaces plugin:
|
||||
@@ -117,6 +125,8 @@ If you have multiple storage plugins configured, the last plugin declared in the
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Test the Space Plugin
|
||||
|
||||
Run your Medusa server with the following command:
|
||||
@@ -135,6 +145,8 @@ You can also check that the image was uploaded on the Space’s page.
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Next.js Storefront Configuration
|
||||
|
||||
If you’re using a [Next.js](../starters/nextjs-medusa-starter.mdx) storefront, you need to add an additional configuration that adds the Space’s domain name into the configured images’ domain names. This is because all URLs of product images will be from the Space.
|
||||
@@ -161,8 +173,10 @@ module.exports = withStoreConfig({
|
||||
|
||||
Where `<YOUR_SPACE_DOMAIN>` is the domain name for your Space which can be retrieved from the Space URL. For example, `medusa-server.fra1.digitaloceanspaces.com`.
|
||||
|
||||
## What’s Next
|
||||
---
|
||||
|
||||
## See Also
|
||||
|
||||
- Check out [more plugins](https://github.com/medusajs/medusa/tree/master/packages) you can add to your store.
|
||||
- Learn how to [deploy the Medusa server on DigitalOcean](../deployments/server/deploying-on-digital-ocean.md).
|
||||
- Learn about the [Next.js](../starters/nextjs-medusa-starter.mdx) and [Gatsby](../starters/gatsby-medusa-starter.mdx) storefronts.
|
||||
- [Seploy the Medusa server on DigitalOcean](../deployments/server/deploying-on-digital-ocean.md).
|
||||
- Install the [Next.js](../starters/nextjs-medusa-starter.mdx) or [Gatsby](../starters/gatsby-medusa-starter.mdx) storefront.
|
||||
|
||||
Reference in New Issue
Block a user