我試圖使用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
請求頭? 感謝您的回覆。
我有這個問題,即使我已經添加它,有什麼建議嗎? –