Skip to content

Commit

Permalink
docs: fix media library usage (#3181)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiuweehan committed Feb 3, 2020
1 parent 05c3e5c commit 9c76a14
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions website/content/blog/netlify-cms-gatsby-plugin-4-0-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ The Netlify CMS media library extensions for Cloudinary and Uploadcare are not i
**Note:** if you're using `gatsby-starter-netlify-cms`, the media libraries are registered within the starter itself.

```javascript
import CMS from 'netlify-cms-app'
import CMS from 'netlify-cms-app';

// You only need to import the media library that you'll use. We register both
// here for example purposes.
import uploadcare from 'netlify-cms-media-library-uploadcare'
import cloudinary from 'netlify-cms-media-library-cloudinary'
import uploadcare from 'netlify-cms-media-library-uploadcare';
import cloudinary from 'netlify-cms-media-library-cloudinary';

CMS.registerMediaLibrary('uploadcare', uploadcare)
CMS.registerMediaLibrary('cloudinary', cloudinary)
CMS.registerMediaLibrary(uploadcare);
CMS.registerMediaLibrary(cloudinary);
```

For more information about the media libraries, refer to the docs.
Expand Down
2 changes: 2 additions & 0 deletions website/content/docs/cloudinary.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ media_library:

**Note:** The user must be logged in to the Cloudinary account connected to the `api_key` used in your Netlify CMS configuration.

**Note:** The Netlify CMS media library extensions for Cloudinary are not included in `netlify-cms-app`. If you're using `netlify-cms-app`, you'll need to [register the media libraries yourself](https://www.netlifycms.org/blog/2019/07/netlify-cms-gatsby-plugin-4-0-0#using-media-libraries-with-netlify-cms-app).

### Security Considerations
Although this setup exposes the `cloud_name` and `api_key` publicly via the `/admin/config.yml` endpoint, this information is not sensitive. Any integration of the Cloudinary media library requires this information to be exposed publicly. To use this library or use the restricted Cloudinary API endpoints, the user must have access to the Cloudinary account login details or the `api_secret` associated with the `cloud_name` and `api_key`.

Expand Down
2 changes: 2 additions & 0 deletions website/content/docs/uploadcare.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ media_library:
Once you've finished updating your Netlify CMS configuration, the Uploadcare widget will appear when
using the image or file widgets.

**Note:** The Netlify CMS media library extensions for Uploadcare are not included in `netlify-cms-app`. If you're using `netlify-cms-app`, you'll need to [register the media libraries yourself](https://www.netlifycms.org/blog/2019/07/netlify-cms-gatsby-plugin-4-0-0#using-media-libraries-with-netlify-cms-app).

## Configuring the Uploadcare Widget

The Uploadcare widget can be configured with settings that are outlined [in their
Expand Down

0 comments on commit 9c76a14

Please sign in to comment.