docs: fix media library usage (#3181)

This commit is contained in:
tiuweehan 2020-02-03 17:05:33 +08:00 committed by GitHub
parent 05c3e5cf31
commit 9c76a140c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -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.

View File

@ -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`.

View File

@ -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