七牛云存储 - 关于 callback_body
PHP中文网
PHP中文网 2017-04-21 11:19:10
0
2
752

http://docs.qiniu.com/ruby-sdk/v3/index.html#generate-upload-token

Qiniu::RS.generate_upload_token :scope              => target_bucket,
                                :expires_in         => expires_in_seconds,
                                :callback_url       => callback_url,
                                :callback_body      => callback_body,
                                :callback_body_type => callback_body_type,
                                :customer           => end_user_id,
                                :escape             => allow_upload_callback_api,
                                :async_options      => async_callback_api_commands,
                                :return_body        => custom_response_body

我使用JavaScript方式上传,上传表单参加中也有指定params,业务服务器参成功获取到params参数内容,callback_body 指定的内容没有在请求中,不清楚这两者有什么区别

我期望的是,callback_body 中放一些敏感数据,放在uploadToken中,其它数据放在params中!

另外顺便说一下,你们真的应该好好整理一下文档了,我跟我的小伙伴都觉得你们的文档写的太过晦涩,写技术文案不能写成二次元的小说,要通俗一点,让我们这些小白以及半路出家的泥腿子在不太费力的情况下也能看得懂!一个好的产品有一个好的文档比什么都重要,你们自己去点点文档中心,感受一下!天天去布道,有啥意思呢,把文档写好,把技术弄强是根本!

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
洪涛

You can look at the upload policy here http://developer.qiniu.com/docs/v6/api/reference/security/put-policy.html and here http://developer.qiniu.com/docs/v6/api /reference/security/upload-token.htmlUpload credentials

刘奇

The reason callbackBody and callbackUrl need to be used at the same time is because Qiniu’s server will post the parameters in callbackBody to callbackUrl after the upload is successful.

callbackUrl and params are used together and are the old form upload interface http://docs.qiniutek.com/v3/api/io/#callback-logic

This params is abandoned in the new interface, replaced by the new callbackBody. So now you only need to use callbackBody and callbackUrl, both of which are written in the putPolicy in the generated Uploadtoken.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template