【问题标题】:a presigned post in boto3 is the same as a browser based post with rest api signature calulucation server side?boto3 中的预签名帖子与基于浏览器的帖子与 rest api 签名计算服务器端的帖子相同吗?
【发布时间】:2018-03-22 07:29:35
【问题描述】:

在过去的 3 天里,我一直在尝试从用户浏览器手动签署 restapi post 调用。我失败了。我继续收到signature mismatch 错误:所以现在我要尝试 boto3。当您将文件上传到服务器然后将其发送到亚马逊时,它似乎使用了 Boto3。我宁愿做一个基于浏览器的帖子。

我正在阅读来自 boto3 的关于预先签名的帖子的文档,但我不确定。基于浏览器的帖子是否与 boto 3 中的预签名帖子相同? http://boto3.readthedocs.io/en/latest/guide/s3.html#generating-presigned-posts

【问题讨论】:

    标签: python amazon-s3 boto3


    【解决方案1】:

    为什么是的。是的,它是:

    Returns
    A dictionary with two elements: url and fields. Url is the url to post to. Fields is a dictionary filled with the form fields and respective values to use when submitting the post. For example:
    
    {'url': 'https://mybucket.s3.amazonaws.com
    'fields': {'acl': 'public-read',
    'key': 'mykey', 'signature': 'mysignature', 'policy': 'mybase64 encoded policy'}
    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-11-16
      • 2018-12-15
      • 2019-05-26
      • 2010-11-16
      • 2014-06-26
      • 1970-01-01
      • 2012-12-07
      相关资源
      最近更新 更多