tencentyun / wafer2-node-sdk

Wafer2 SDK for Node.js
Other
268 stars 57 forks source link

生产环境上传图片拿到imageKey是扩展名 #52

Closed LYnnProspery closed 6 years ago

LYnnProspery commented 6 years ago

wafer-node-sdk 已升级到 1.4.5,问题依然存在

jas0ncn commented 6 years ago

检查一下 node_modules 的 lib/upload/index.js 是否确实是正确的: https://github.com/tencentyun/wafer2-node-sdk/blob/master/lib/upload/index.js#L93

LYnnProspery commented 6 years ago

确认,为正确代码,结果依然是imageKey为空 image 这期间为 调整uploadFolder参数的结果,但是个人感觉 无论路径层级,返回的imageKey为空都是有问题的。但是目前没有定位到问题 个人的cos配置

cos: {
        region: 'ap-beijing',
        // Bucket 名称       
        fileBucket: 'miss',
        // 文件夹
        uploadFolder: 'miss',

        SecretId: '###',
        SecretKey: '###',
    }

测试环境 ok,生产环境会出现此问题。

jas0ncn commented 6 years ago

依赖是线上安装的还是打包的本地 node_modules 呢?

LYnnProspery commented 6 years ago

已解决 感谢