Using S3File for images in KeystoneJS

老子叫甜甜 提交于 2019-12-06 13:43:35

Looks like they intend to improve this.

https://gist.github.com/JedWatson/8519769

https://github.com/JedWatson/keystone/issues/165

My hack solution is to directly edit the keystone template file in node_modules - until these issues are resolved. Edit node_modules/keystone/templates/fields/s3file/form.jade and add wherever you want:

img(src=item.get(field.paths.url))

Then remember to revert this hack after it's officially supported (as updates will blow away the hack).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!