@kne/fastify-aliyun 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,9 +29,10 @@ module.exports = fp(async (fastify, options) => {
29
29
  return result.content;
30
30
  };
31
31
 
32
- const getFileStream = ({ filename }) => {
32
+ const getFileStream = async ({ filename }) => {
33
33
  const client = createClient();
34
- return client.getStream(`${options.oss.baseDir}/${filename}`).stream;
34
+ const result = await client.getStream(`${options.oss.baseDir}/${filename}`);
35
+ return result.stream;
35
36
  };
36
37
 
37
38
  const getFileLink = ({ filename, expires }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kne/fastify-aliyun",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "对接阿里云服务",
5
5
  "main": "index.js",
6
6
  "scripts": {