Giter Site home page Giter Site logo

qiniu-imagehosting's Introduction

七牛云图床

七牛logo

简要使用步骤

  1. 注册七牛云账户
  1. 创建属于你的账号并完善相关信息,在个人中心获取 AccessKey/SecretKey
  2. 添加对象存储空间bucket,对于没有绑定过自己域名(需要备案)的账号,七牛云会提供一个测试域名,后续图片访问也是基于该域名的。
  1. 配置conf.json
{
    "src": "Local directory to upload",
    "dest": "qiniu:access_key=[Please apply your access key here]&secret_key=[Dont send your secret key to anyone]&bucket=[Bucket name on qiniu resource storage]",
    "debug_level": 1
}
  1. 使用命令同步文件
    在命令行运行qrsync conf.json即可提交文件。
_> qrsync conf.json
 2017/05/12 14:15:02.185127 [INFO] qbox.us/qrsync/v3/qrsync/qrsync.go:50: Syncing E:\blogImg => jq-blog
 2017/05/12 14:15:02.218215 [INFO] qbox.us/qrsync/v3/sync/sync.go:172: Putting others/qiniuLogo.png
 2017/05/12 14:15:02.623598 [INFO] qbox.us/qrsync/v3/sync/sync.go:146: Put E:\blogImg/others/qiniuLogo.png => jq-blog:others/qiniuLogo.png
 Sync done!

成功上传!

图片地址为: http://[域名][图片路径],如:
http://oe8r161mt.bkt.clouddn.com/others/qiniuLogo.png

  1. chrome插件
    chrome 上安装qiniu upload files方便管理和查看。

小tips

如果需要不同大小的图片,可在图片URL后添加查询参数如:?imageView/2/w/400/q/100来定义图片大小和质量。

详情参考七牛图片基本处理开发者中心文档。

参考

qrsync 命令行同步工具

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.