我使用上传视频。基于Jive文档,我将遵循提交请求的过程。
员额:
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请求中的"type":"video"无法工作。有人能给我一些建议吗?
发布于 2018-08-23 08:49:53
要在Jive中上传视频,您需要使用不同的端点。请查看下面的API文档:
https://developers.jivesoftware.com/api/v3/cloud/rest/VideoService.html#uploadVideo(MultipartBody)
如果要将视频上传为文件(即不被Jive呈现),则需要使用“file”类型:
https://developers.jivesoftware.com/api/v3/cloud/rest/FileEntity.html
希望这能有所帮助。
https://stackoverflow.com/questions/51973031
复制相似问题