Alfresco Share 是否有等效的 FileTypeImageUtils?

发布于 2024-12-16 15:47:10 字数 132 浏览 5 评论 0 原文

我需要根据内容文件的媒体类型检索其图标。

我知道在 Alfresco Explorer 中您可以使用 FileTypeImageUtils.getFileTypeImage() 方法。

Share 中有类似的东西吗?

I need to retrieve the icon of a content file based on its media type.

I know that in Alfresco Explorer you could use the FileTypeImageUtils.getFileTypeImage() method.

Is there something equivalent in Share?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

素染倾城色 2024-12-23 15:47:10

您想要文件图标还是文件缩略图?

如果您使用的是 Alfresco 4.0,则请求文档缩略图的 URL 为 /proxy/alfresco/api/node/workspace/[Store]/[ID]/content/thumbnails/doclib?c=queue&ph=true例如
http://localhost:8080/share/proxy/alfresco/api/node/workspace/SpacesStore/62d652d5-5759-434e-8739-295fa3447481/content/thumbnails/doclib?c=queue&ph= true

构建方法通常是:

Alfresco.constants.PROXY_URI + 'api/node/' + nodeRef.uri + '/content/thumbnails/doclib?c=queue&ph=true"

如果您只想要图标,那么代码就是一些东西 喜欢:

Alfresco.constants.URL_RESCONTEXT + 'components/images/filetypes/' + Alfresco.util.getFileIcon(name)

Do you want the file icon, or the file thumbnail?

If you're on Alfresco 4.0, the URL to request the thumbnail of a document is /proxy/alfresco/api/node/workspace/[Store]/[ID]/content/thumbnails/doclib?c=queue&ph=true eg
http://localhost:8080/share/proxy/alfresco/api/node/workspace/SpacesStore/62d652d5-5759-434e-8739-295fa3447481/content/thumbnails/doclib?c=queue&ph=true

The way to build that is usually:

Alfresco.constants.PROXY_URI + 'api/node/' + nodeRef.uri + '/content/thumbnails/doclib?c=queue&ph=true"

If you do just want the icon, then the code is something like:

Alfresco.constants.URL_RESCONTEXT + 'components/images/filetypes/' + Alfresco.util.getFileIcon(name)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文