基于Atom安装七牛图床
>1、安装qiniu-uploader和markwodn-assistant
步骤:点击文件,然后打开设置,随后点击安装,先安装qiniu-uploader
![qiniu](http://owxsbpjrr.bkt.clouddn.com/7b4e24c58febac6510172037ea4fd3e1.png)
然后安装markwodn-assistant
>2、配置ainiu-uploader
首先注册七牛云的会员,进入控制管理台![cunchu](http://owxsbpjrr.bkt.clouddn.com/57be1cea83ca911d889453820277201d.png)
新建存储空间
![xinjian](http://owxsbpjrr.bkt.clouddn.com/619b83ce84c5072fd58e0cd84f2f8af4.png)
获取 AK 和 SK
点击右上角的 个人面板 下的 密钥管理,在新的页面中点击 创建密钥,就会生成 AK 和 SK ,进入个人中心-密钥管理,如图:
![miyao](http://owxsbpjrr.bkt.clouddn.com/ca68af5edaf9360275fe6b3e73c58912.png)
>3、配置qiniu-uploader
点击文件-设置-扩展,找到qiniu-uploader,点击setting,然后配置如下图:![peizhi](http://owxsbpjrr.bkt.clouddn.com/7583e0fcba077a185bcf599318fa120a.png)
接下来解决不能上传的问题
解决Bug
先附上错误图![11](http://owxsbpjrr.bkt.clouddn.com/da79c8140fd97dc4248e3d616d06b3a9.png)
需要手动替换三个文件,这个三个文件在 ~/.atom/packages/qiniu-uploader/node_modules/qiniu/qiniu 目录中,这三个文件分别是 :
>1、io.js
var conf = require('./conf');var util = require('./util');
var rpc = require('./rpc');
var fs = require('fs');
var getCrc32 = require('crc32');
var url = require('url');
var mime = require('mime');
var Readable = require('stream').Readable;
var formstream = require('formstream');
var urllib = require('urllib');
var zone = require('./zone');
exports.UNDEFINED_KEY = '?'
exports.PutExtra = PutExtra;
exports.PutRet = PutRet;
exports.put = put;
exports.putWithoutKey = putWithoutKey;
exports.putFile = putFile;
exports.putReadable = putReadable;
exports.putFileWithoutKey = putFileWithoutKey;
// @gist PutExtra
function PutExtra(params, mimeType, crc32, checkCrc) {
this.params = params