我试图使用Javascript Preview SDK
从我的Web应用程序中读取帐户帐户中的所有文件。我希望从我的自定义Web应用程序中预览我的箱子帐户上的所有文件。有一些方法可以使用默认的ID
,允许我阅读箱子帐户中的所有文件夹和文件?BOX API,使用Box javascript预览SDK读取我的帐户帐户中的所有文件
目前,我正在尝试使用:
Box.Preview.show('FILE_ID',{
token: access_token,
container: '.preview-container',
showDownload: true
});
的access_token
是通过this页中所述的方法获得。此外,使用上面的代码我得到这个错误:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' http://localhost:3000 ' is therefore not allowed access. The response had HTTP status code 404. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
如何设置使用Javascript Preview SDK
请求头? 感谢您的回复。
我有这个问题,即使我已经添加它,有什么建议吗? –