开发者社区> 问答> 正文

biz.cspace.saveFile调用失败

钉钉已经申请该权限:
dd.config($.extend(
true,
                            {
                                appId: '',
                                corpId: window.ding['corpId'],
                                jsApiList: [
                                        'biz.cspace.saveFile', //盯盘存储
                                        'biz.cspace.preview' //盯盘预览
                                ]
                            },
                            ret['data']
                        ));
然而调用存储接口,仍然提示错误,代码如下:
dd.biz.cspace.saveFile({
                        corpId:window.ding['corpId'],
                        url: file_long,
                        name:"文件预览123",
                        onSuccess: function(data) {
  console.log('上传成功:',data);
                        },
                        onFail: function(err) {
  console.log('失败:',err);
                        }
                    });

onFail回调返回如下:
失败: Object {errorCode: 7, errorMessage: "requestJsApis() not invoked"}


引用的js文件为:[size=; font-size: 10.5pt,10.5pt] http://g.alicdn.com/ilw/ding/0.9.9/scripts/dingtalk.js

展开
收起
dindin 2016-06-24 09:04:52 5577 0
1 条回答
写回答
取消 提交回答
  • Rebiz.cspace.saveFile调用失败
    已经解决,是我的问题,并没有重新走登录流程去申请jsApilist
    2016-06-24 09:35:22
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Well-That-Escalated-Quickly-How-Abusing-The-Docker-API-Led-To-Remote-Code-Execution-Same-Origin-Bypass-And-Persistence 立即下载
Data as a Service - 数据即服务 立即下载
Spark SQL:Past Present &Future 立即下载