Skip to content

Commit

Permalink
客户端点击相关文件中的附件,报错"Accounts is not defined"
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhipei committed Mar 12, 2024
1 parent a42f5e0 commit b927216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion steedos-packages/webapp-public/public/js/nw_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ if (isNode()) {

nw_core.openFile = function (file_url, filename) {
// 文件下载增加认证参数
const authObject = { authToken: Accounts._storedLoginToken() }
const authToken = localStorage["steedos:token"] || localStorage["Meteor.loginToken"]
const authObject = { authToken: authToken }
const token = window.btoa(JSON.stringify(authObject))
// 如果url已经有参数则拼接token
if (file_url.indexOf('?') > 0) {
Expand Down

0 comments on commit b927216

Please sign in to comment.