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

七牛API——上传前删除bucket现有内容 #27

Closed
4 tasks done
EthanLin-TWer opened this issue Aug 28, 2016 · 0 comments
Closed
4 tasks done

七牛API——上传前删除bucket现有内容 #27

EthanLin-TWer opened this issue Aug 28, 2016 · 0 comments
Assignees

Comments

@EthanLin-TWer
Copy link
Owner

EthanLin-TWer commented Aug 28, 2016

如题。这样我就不需要每次手动去删了。核心功能已经实现

Todolist:

  • bucket删除与文件上传最后做成同步(sync)的,做成异步的在pipeline上跑还是可能有意想不到的情况出现
    • 现在解决方案是:在npm run deploy时,它其实是跑npm run build,现在在build前后加上了npm run qiniucleannpm run qiniusync的task,一开始就发起remove请求,虽然不治本,但是降低了时序上先添后删的概率。另外,本地在调试的时候,可以放心地使用npm run build而不用担心真正与七牛发生交互
  • 七牛代码重构:
    • remove部分的代码对于gitbook的deploy也使用,可能应该放在公用文件夹
    • 使用qiniu.js的多个方法都需要重复传入accessKeysecretKey,应该有其他方法消除重复,减少维护地点

参考:

@EthanLin-TWer EthanLin-TWer self-assigned this Sep 1, 2016
EthanLin-TWer added a commit that referenced this issue Sep 1, 2016
EthanLin-TWer added a commit that referenced this issue Sep 2, 2016
EthanLin-TWer added a commit that referenced this issue Sep 2, 2016
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

1 participant