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
createReadStram 可以读取路径上的 buffer 文件 但是如果本身不是路径 是上传上来的文件 那么就需要 stream 转为流 数据 然后在进行上传 const bufferStream = new Stream.PassThrough(); const readStream = bufferStream.end(val); const options = ({ filename: 'sample.json', contentType: 'application/json' }); const startTime = +new Date(); const result = await attachment.write(options, readStream, (error, file) => { console.log(error); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
createReadStram 可以读取路径上的 buffer 文件
但是如果本身不是路径 是上传上来的文件 那么就需要 stream 转为流 数据 然后在进行上传
const bufferStream = new Stream.PassThrough();
const readStream = bufferStream.end(val);
const options = ({ filename: 'sample.json', contentType: 'application/json' });
const startTime = +new Date();
const result = await attachment.write(options, readStream, (error, file) => {
console.log(error);
});
The text was updated successfully, but these errors were encountered: