上传素材缩略图

优质
小牛编辑
114浏览
2023-12-01

接口说明

上传素材的缩略图
如需调用,请访问 开发者文档 来查看详细的接口使用说明
该接口仅开放给已获取SDK的开发者

API地址

POST /api/server/1.0.0/uploadImg

是否需要登录

请求字段说明

参数类型请求类型是否必须说明
guidstringform素材ID
posxnumberform相机位置X
posynumberform相机位置Y
posznumberform相机位置Z
upxnumberform相机的上方向X
upynumberform相机的上方向Y
upznumberform相机的上方向Z
directionxnumberform相机视图方向X
directionynumberform相机视图方向Y
directionznumberform相机视图方向Z
imageBase64Codestringform缩略图

响应字段说明

响应成功示例

{
  "code": 200,
  "data": "",
  "message": "OK"
}

响应失败示例

{
  "code": 500,
  "message": "未知错误,请及时联系管理人员进行处理"
}

响应接受类型

application/json:charset=utf-8

响应状态码

HTTP状态码原因
204No Content
401Unauthorized
403Forbidden
40001查询结果为空
40001查询结果不是JSON数据
40001查询结果JSON不符合要求
40002请求接口失败
40003参数无效
40004令牌无效
40004令牌为空

示例代码

$.ajax({
    url:'/api/server/1.0.0/uploadImg',
    type:'POST',
    data:'posx=&posy=&posz=&imageBase64Code=&guid=&directionx=&directiony=&directionz=&upx=&upz=&upy=',
    dataType:'text',
    cache:false,
    contentType: "application/x-www-form-urlencoded",
	xhrFields: {
        withCredentials: true
    },
    crossDomain: true,
    success:function(data){
        // 成功返回值
    },
    error:function(XMLHttpRequest, textStatus, errorThrown){

    }
})