Skip to content

7480 update jssdk readme #9

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

Merged
merged 2 commits into from
Apr 8, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ qiniu-js-sdk
browse_button: 'pickfiles', //上传选择的点选按钮,**必需**
uptoken_url: '/token', //Ajax请求upToken的Url,**强烈建议设置**(服务端提供)
// uptoken : '<Your upload token>', //若未指定uptoken_url,则必须指定 uptoken ,uptoken由其他程序生成
// unique_names: true, // 默认 false,key为文件名。若开启该选项,SDK为自动生成上传成功后的key(文件名)
// save_key: true, // 默认 false。若在服务端生成uptoken的上传策略中指定了 `sava_key`,则开启,SDK会忽略对key的处理
// unique_names: true, // 默认 false,key为文件名。若开启该选项,SDK会为每个文件自动生成key(文件名)
// save_key: true, // 默认 false。若在服务端生成uptoken的上传策略中指定了 `sava_key`,则开启,SDK在前端将不对key进行任何处理
domain: 'http://qiniu-plupload.qiniudn.com/', //bucket 域名,下载资源时用到,**必需**
container: 'container', //上传区域DOM ID,默认是browser_button的父元素,
max_file_size: '100mb', //最大文件体积限制
Expand Down Expand Up @@ -286,11 +286,9 @@ qiniu-js-sdk

直接运行本SDK示例网站的服务

* [安装nodejs](http://nodejs.org/download/)
* 安装 [Nodejs](http://nodejs.org/download/)、[npm](https://www.npmjs.org/)

* [安装npm](https://www.npmjs.org/)

* 安装七牛 Node.js SDK、express `npm install`
* `npm install`,安装七牛 Node.js SDK、Express

* 获取源代码:
`git clone [email protected]:qiniupd/qiniu-js-sdk.git`
Expand All @@ -315,11 +313,12 @@ qiniu-js-sdk

## 说明

1. 本SDK依赖Plupload,初始化之前请引入Plupload插件
1. 本SDK依赖Plupload,初始化之前请引入Plupload。

2. 本SDK依赖服务端颁发uptoken,可以提供Ajax请求地址 `uptoken_url` 或者直接设置 `uptoken` 实现,建议前者。
2. 本SDK依赖uptoken,可以通过提供Ajax请求地址 `uptoken_url` 或者直接设置 `uptoken` 实现,强烈建议前者。

3. 如果您想了解更多七牛的上传策略,建议您仔细阅读 [七牛官方文档-上传](http://developer.qiniu.com/docs/v6/api/reference/up/)
3. 如果您想了解更多七牛的上传策略,建议您仔细阅读 [七牛官方文档-上传](http://developer.qiniu.com/docs/v6/api/reference/up/)。
另外,七牛的上传策略是在后端服务指定的,本SDK的 setOption API 只是设置 Plupload的初始化参数,和上传策略无关。

4. 如果您想了解更多七牛的图片处理,建议您仔细阅读 [七牛官方文档-图片处理](http://developer.qiniu.com/docs/v6/api/reference/fop/image/)

Expand Down