Home  >  Q&A  >  body text

七牛云存储 - 关于 callback_body

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中文网2762 days ago719

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-21 11:21:10

    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

    reply
    0
  • 怪我咯

    怪我咯2017-04-21 11:21:10

    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.

    reply
    0
  • Cancelreply