我正在使用撇号cms作为CMS启动项目。 我需要的一件事是能够添加用户个人资料图片。 我已经看到它在演示中提供here.
是可行的我已经搜索了文档如何做到这一点,但没有看到它的直接暗示。 有人能指出我正确的方向吗?如何实现这个目标?
亲切的问候
答案 0 :(得分:0)
您希望在负责管理用户个人资料的部分的架构中添加apostrophe-images
窗口小部件,在这种情况下为apostrophe-users
。
在lib/modules/apostrophe-users/index.js
module.exports = {
addFields: [
{
name: 'thumbnail',
type: 'singleton',
widgetType: 'apostrophe-images',
label: 'Profile Picture',
options: {
limit: 1,
aspectRatio: [100, 100]
}
}
]
};
您可以更改limit
和aspectRatio
以满足您的需求或完全省略它们。
您可以通过查看代码
来查看演示如何执行其操作的代码