SDK 或 APP 调用

默认上传都是以表单的形式进行,但阿里云 OSSAPP应用提供的SDK表单上传需要的参数完全不同,所以type参数值只对aliyun模块有效,其他模块返回的还是表单所需要的参数。

又称「获取STS临时授权Token(SDK或APP使用)」

响应示例:

  1. {
  2. "status": 200,
  3. "message": "success",
  4. "data": {
  5. "assumed_role_user": {
  6. "assumed_role_id": "343070050315638201:temp_user",
  7. "arn": "acs:ram::1763866338345155:role/aliyunosstokengeneratorrole/temp_user"
  8. },
  9. "credentials": {
  10. "access_key_id": "STS.NKE6hsxakTcnYYLrfSDxMsvry",
  11. "access_key_secret": "CQLwj8inzfXza9P2ZPPuRdK5JLzxvgDE7nJGSqziugSh",
  12. "security_token": "CAISmwJ1q6Ft5B2yfSjIr4jwfdLHlb5K46GFW3/9lmYGSPdhnLPZmzz2IHxPfHZoAe0etf0ymmtY7P4blqBvRppdclHfYNEobzzZINHlMeT7oMWQweEugv/MQBqmaXPS2MvVfJ+2Lrf0ceusbFbpjzJ6xaCAGxypQ12iN+/u6/tgdc9FZhSkSjBECdxKXEgAzvUXLnzML/2gHwf3i27LdipStxF7lHl05NbYoKiV4QGMi0bhmK1H5dazAOD9MJc3bMkhCIzlh7ArL/ec6kMKtUgWrpURpbdf5DLKsuuaB1Rs+BicO4LWiIYzd1cmPvBnQ/Ud8aanxacg4/agnoD22gtLOvpOTyPcSYavzc3JAuq1McwjcrL2K98kJyxF2WCeGoABOnD8DnBDeRlSnQbT2Xer3svxDOeyyQO2mJ6CIYDuwUDVnIQTVukoN2A54BAXBTzWiJcxTktKW3LPeJ0OzSRfzdMIu+wB4Ftoi4LnaPOPl9h//QZanP5nCLzR5LjkXg7ERU+omEDQwz5G97M0E7i+i+MTMrNA4Tiy4XoUxNw2RCQ=",
  13. "expiration": "2018-05-28T14:49:21Z"
  14. },
  15. "policy": "{\"Version\":\"1\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"oss:PutObject\"],\"Resource\":[\"acs:oss:*:*:*\"]}]}",
  16. "bucket": "careyshop",
  17. "callback": "{\"callbackUrl\":\"http:\\/\\/careyshop.oruei.com\\/api\\/v1\\/upload\\/method\\/put.upload.data\\/module\\/aliyun.html\",\"callbackBody\":\"replace=${x:replace}&parent_id=${x:parent_id}&filename=${x:filename}&mime=${mimeType}&size=${size}&width=${imageInfo.width}&height=${imageInfo.height}&path=${object}&hash=${etag}\",\"callbackBodyType\":\"application\\/x-www-form-urlencoded\"}",
  18. "callback_url": "http://careyshop.oruei.com/api/v1/upload/method/put.upload.data/module/aliyun.html",
  19. "expires": 1527518962
  20. }
  21. }

备注:

  1. 阿里云对象存储 OSS 详细说明

  2. 创建授权策略

文档更新时间: 2018-05-28 22:07