We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
var config = { credentials: { ak: stsToken.accessKeyId, // 您的AK sk: stsToken.secretAccessKey // 您的SK }, sessionToken: stsToken.sessionToken, endpoint: 'https://bj.bcebos.com' // 传入Bucket所在区域域名 } const client = new baidubce.sdk.BosClient(config) var response = await client.getObject(bucket, key) var blob=new Blob([response.body], { type: 'application/pdf' }) const url = URL.createObjectURL(blob) const a = document.createElement('a') a.href = url a.download = name a.click() URL.revokeObjectURL(url)
下载后文件大小不对和原始文件不一样 有人知道为什么吗
The text was updated successfully, but these errors were encountered:
No branches or pull requests
var config = {
credentials: {
ak: stsToken.accessKeyId, // 您的AK
sk: stsToken.secretAccessKey // 您的SK
},
sessionToken: stsToken.sessionToken,
endpoint: 'https://bj.bcebos.com' // 传入Bucket所在区域域名
}
const client = new baidubce.sdk.BosClient(config)
var response = await client.getObject(bucket, key)
var blob=new Blob([response.body], { type: 'application/pdf' })
const url = URL.createObjectURL(blob)
const a = document.createElement('a')
a.href = url
a.download = name
a.click()
URL.revokeObjectURL(url)
下载后文件大小不对和原始文件不一样
有人知道为什么吗
The text was updated successfully, but these errors were encountered: