fix: allow absolute urls in public_folder (#5311)

This commit is contained in:
Gerard Wilkinson
2021-04-29 10:57:43 +01:00
committed by GitHub
parent 724d172cf0
commit d1bcbe0a4c
6 changed files with 40 additions and 0 deletions

View File

@ -73,6 +73,8 @@ public_folder: "/images/uploads"
Based on the settings above, if a user used an image widget field called `avatar` to upload and select an image called `philosoraptor.png`, the image would be saved to the repository at `/static/images/uploads/philosoraptor.png`, and the `avatar` field for the file would be set to `/images/uploads/philosoraptor.png`.
This setting can be set to an absolute URL e.g. `https://netlify.com/media` should you wish, however in general this is not advisable as content should have relative paths to other content.
## Media Library
Media library integrations are configured via the `media_library` property, and its value should be an object with at least a `name` property. A `config` property can also be used for options that should be passed to the library in use.