apostrophe-cms - 无法检索附件 url
问题描述
我有一篇带有文件字段的文章
module.exports = {
extend: 'apostrophe-pieces',
name: 'article',
label: 'Article',
pluralLabel: 'Articles',
orderings: true,
addFields: [
Other fields...
{
name: 'files',
label: 'Files',
type: 'singleton',
widgetType: 'apostrophe-files'
},
]
};
在 html 中,我使用了撇号文件小部件
{{ apos.singleton(data.piece, 'files', 'apostrophe-files') }}
当我在 html 中显示它们时它工作正常,但是当我单击为下载文件而创建的链接时,它在控制台中给了我错误。
模板警告:无法检索附件 url,因为它丢失了,已设置默认图标。请尽快解决这个问题!
我看不出我做错了什么。
解决方案
我现在不知道为什么,但似乎它不起作用,因为我几天前上传了文件,并且附件的 url 因某种原因发生了变化。我将文件放入垃圾箱,并添加了新文件,效果很好。
推荐阅读
- python - 如何在 Gurobi python 界面中创建二进制变量?
- python - 我可以在 Python Markdown 中将标签列入白名单吗?
- php - Laravel PHPUnit 测试抛出禁止错误
- reactjs - 开发服务器返回响应错误码:500\React Native
- javascript - 使用 React 和 JQuery 从文件中绘制 SVG 的问题
- javascript - 我想获取具有相同字段名称的对象中的所有值并存储在数组中
- jenkins - Jenkins > Blue Ocean > 从最新提交构建
- google-cloud-platform - 使用 fstab 和 gcsfuse 在存储桶名称前自动添加斜线
- xml - 如何使用 XSLT 1 计算 XML 元素中的值
- c++ - 从资源中提取时出现错误 1814