我正在使用 Telescope 构建一个新应用程序,与 ProductHunt 相同。我从其他网站导入了新的提要帖子,例如 http://gigaom.com/feed/ ,在管理设置面板中。
在浏览器控制台中,我执行了 Meteor.call ('fetchFeeds')
代码来测试 feed。但提要未导入,命令提示符中显示错误。
*Error [ Body cannot exceed 3000 characters][400].
error.Type :' Meteor.Error'*
如何克服这个问题,请回复。这真的很有帮助。谢谢。
最佳答案
如果您提供的内容超过 3000 个单词,则会出现该错误,因为您在 Posts 对象上设置了最大长度为 3000 的验证集。您可以在 telescope-posts< 中更新以下代码
包 posts.js您想要的任何验证,甚至删除它以允许导入任意数量的数据..
/**
Post body (markdown)
*/
body: {
type: String,
optional: true,
max: 3000,
editableBy: ["member", "admin"],
autoform: {
rows: 5
}
}
关于javascript - Meteor.Error 正文不能超过 3000 个字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31936398/