我正在使用Jive REST API上传视频。基于Jive REST文档,我正在遵循提交请求的过程。
POST:
https://{Community_Url}/api/core/v3/contents
正文(JSON格式):
{
"content": {
"type": "text/html",
"text": "<body><p>Upload a file using API </p></body>"
},
"subject": "Test Video Aug 21 - 2",
"visibility": "place",
"categories" : [ "support" ],
"tags" : ["exit"],
"type": "video",
"attachments" : [{
"name" : "dolbycanyon.mp4",
"url" : "http://mirrors.standaloneinstaller.com/video-sample/dolbycanyon.mp4",
"doUpload" : "true"}]
}
标题:
Content-Type: application/json
Authorization: "Basic {username and password}"
不幸的是,我得到的答复是服务器问题。
响应:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>System Error</title>
<style>
body {
font-family : arial, helvetica, sans-serif;
font-size: 81.25%;
}
td, th, p, div, span, li, a { font-size : 1em; }
h1 { font-size : 1.72em; }
code {
font-family : courier new, monospace;
font-size : .8em;
}}
</style>
</head>
<body>
<div id="jive-header">
<h1>System Error</h1>
</div>
<p>
We're sorry but a serious error has occurred in the system.
</body>
</html>
以某种方式,JSON请求中的“类型”:“视频” 无法正常工作。有人可以提供一些建议怎么做
答案 0 :(得分:0)
要在Jive中上传视频,您需要使用其他端点。请查看下面的API文档:
https://developers.jivesoftware.com/api/v3/cloud/rest/VideoService.html#uploadVideo(MultipartBody)
如果您要将视频上传为文件(即不由Jive渲染),则需要使用“文件”类型:
https://developers.jivesoftware.com/api/v3/cloud/rest/FileEntity.html
希望这会有所帮助。