Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加入代理 上传时报TypeError: Cannot read properties of undefined (reading 'x-oss-request-id')。 #1334

Open
peng267 opened this issue Sep 12, 2024 · 2 comments

Comments

@peng267
Copy link

peng267 commented Sep 12, 2024

  • Browser Version or Node Version:
  • ali-oss Version:
  • Mini Showcase Repository:
  • Network Resoponse Header x-oss-request-id:
@peng267
Copy link
Author

peng267 commented Sep 12, 2024

node版本为v16.20.1
ali-oss Version: 6.17.1

const st = fs.createReadStream(imgLoc);
try {
const { url } = await ossClient.put(ossKey, st);
return url;
} catch(e) {
console.log('上传失败:' + e);
}

@YunZZY
Copy link
Collaborator

YunZZY commented Sep 19, 2024

麻烦确认下这两个问题:

  1. 在创建实例时正确设置了enableProxy和proxy参数
  2. 安装了proxy-agent这个包,这个包在urllib里被设置为了peerDependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants