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

怎么指定上传图片的名称? #39

Open
sunshine824 opened this issue May 5, 2018 · 6 comments
Open

怎么指定上传图片的名称? #39

sunshine824 opened this issue May 5, 2018 · 6 comments

Comments

@sunshine824
Copy link

No description provided.

@gpake
Copy link
Owner

gpake commented May 10, 2018

不好意思,暂时还没有开发这个功能。
后续会添加,建议您先修改本地uploader.js

@CoXier
Copy link

CoXier commented May 10, 2018

指定图片的名称,不是通过 key 指定的吗?

@gpake
Copy link
Owner

gpake commented May 10, 2018

@CoXier
那是一个 bool 值,只判断true false,然后决定使用微信的文件名(false),还是让七牛决定文件名(true)。
当时并没有考虑自定义文件名的需求

@CoXier
Copy link

CoXier commented May 10, 2018

这么说来,README 中的 key: 'customFileName.jpg' 比较有疑惑性。

@gpake
Copy link
Owner

gpake commented May 10, 2018

@CoXier
不好意思,上面的表述有错,正确的如下:
对于文件名的处理有三种状态:

  1. shouldUseQiniuFileName = ture
    • 则不使用「微信文件名」,也不使用 config.key 的值,由七牛指定文件名
  2. shouldUseQiniuFileName = false
    • 默认使用微信文件名
    • 指定了 config.key,则使用指定的 key 作为文件名

@cool-firer
Copy link

指定了key,shouldUseQiniuFileName为false,还是用的微信自己的文件名/tmp/xxxxxxx.png

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

No branches or pull requests

4 participants