我创建了一个类扩展,允许上传附加文件(图像)。属性名称是“headingFile”。
我现在需要获取该图像的 URL,以便可以显示它。
我已经能够通过以下方式获取有关文件的信息: $.getBean("fileManager").readMeta($.content('headingFile'))
但找不到我如何可以获取它的 URL。
如何获取已上传的带有类扩展名的文件的 URL?
谢谢
最佳答案
试试这个
$.getURLForImage(fileid=$.content('headingFile'),size='large')
或
$.getURLForImage(fileid=$.content('headingFile'),width=600,height=300)
或者,如果它不是图像而您只想下载它
$.getURLForFile(fileid=$.content('headingFile'),method='inline')
或
$.getURLForFile(fileid=$.content('headingFile'),method='attachment')
关于coldfusion - Mura CMS - 显示类扩展文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17417370/