Skip to content

Commit 4270a10

Browse files
committed
pfop
1 parent 75c8995 commit 4270a10

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

qiniu/fop.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
1+
var util = require('./util');
2+
var rpc = require('./rpc');
23

34
exports.ImageView = ImageView;
45
exports.ImageInfo = ImageInfo;
56
exports.Exif = Exif;
7+
exports.pfop = pfop;
68

79
function ImageView(mode, width, height, quality, format) {
810
this.mode = mode || 1;
@@ -49,3 +51,11 @@ Exif.prototype.makeRequest = function(url) {
4951
}
5052

5153

54+
function pfop(bucket, key, fops, notify, onret) {
55+
56+
var uri = 'http://api.qiniu.com/pfop/';
57+
var body = 'bucket='+bucket+'&key='+key+'&fops='+fops+'&notifyURL='+notify;
58+
var auth = util.generateAccessToken(uri, body);
59+
rpc.postWithForm(uri, body, auth, onret);
60+
}
61+

0 commit comments

Comments
 (0)