在 Alfresco Share 中的捆绑服务 *.post.js 文件中的 companyhome 未定义错误 [英] companyhome not defined error in bundle service *.post.js file in Alfresco Share

查看:11
本文介绍了在 Alfresco Share 中的捆绑服务 *.post.js 文件中的 companyhome 未定义错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义服务/hayts 处理文件上传和元数据.

I have a custom service /hayts the processes file uploads and metadata.

在遵循 MultiPart Forms 教程.

但是,当我将文件捆绑到 My Share 应用程序 时.我可以加载表单提交它来上传文件.但是POST处理JS失败.

However, when I bundle the files into My Share application. I can load the form submit it to upload the file. But the POST processing JS fails.

Web 脚本/share/page/hayts 已响应状态为 500 - 内部错误.

The Web Script /share/page/hayts has responded with a status of 500 - Internal Error.

500 说明: HTTP 服务器内部的错误导致它无法完成请求.

500 Description: An error inside the HTTP server which prevented it from fulfilling the request.

消息: 11120001 无法执行脚本classpath*:alfresco/web-extension/site-webscripts/com/github/raystorm/smalgyax/hayts/hayts.post.js":11120000 ReferenceError:公司之家"没有定义.(jar:file:/usr/local/tomcat/webapps/share/WEB-INF/lib/smalgyax-share-1.0.0-SNAPSHOT.jar!/alfresco/web-extension/site-webscripts/com/github/raystorm/smalgyax/hayts/hayts.post.js#35)
服务器:Spring WebScripts - v7.10.0 架构 1,000

Message: 11120001 Failed to execute script 'classpath*:alfresco/web-extension/site-webscripts/com/github/raystorm/smalgyax/hayts/hayts.post.js': 11120000 ReferenceError: "companyhome" is not defined. (jar:file:/usr/local/tomcat/webapps/share/WEB-INF/lib/smalgyax-share-1.0.0-SNAPSHOT.jar!/alfresco/web-extension/site-webscripts/com/github/raystorm/smalgyax/hayts/hayts.post.js#35)
Server: Spring WebScripts - v7.10.0 schema 1,000

对于以下行:upload = companyhome.createFile(file.filename, type);为什么它在通过 /alfresco/service/multipart 的 UI 摄取时有效,但不适用于我的共享服务版本 /share/service/hayts?

For the following line: upload = companyhome.createFile(file.filename, type); Why does it work when ingested via the UI at /alfresco/service/multipart but not for my share service version /share/service/hayts?

推荐答案

Alfresco 和 Share 与您可能知道的不同,Alfresco 是平台,Share 是用户界面.

Alfresco and Share and not the same thing as you probably know, Alfresco being the platform and Share being the user interface.

所以两者可用的根对象是不一样的.

So root object available to either are not the same.

https://docs.alfresco.com/6.1/references/APISurf-rootscoped.html

https://docs.alfresco.com/4.2/references/API-JS-rootscoped.html

这篇关于在 Alfresco Share 中的捆绑服务 *.post.js 文件中的 companyhome 未定义错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆