我在烧瓶中的boto3客户端的帮助下使用AWS S3。我能够将我的文件成功上传到s3存储桶。 Deployed Appliation https://k8m00unpc6.execute-api.us-east-1.amazonaws.com/dev
我收到了错误{"message":"Forbidden"}
。
以下代码解释了下载的实现。
@app.route('/download/<filename>',methods=['POST','GET'])
def download(filename):
return send_file('https://s3.amazonaws.com/zappa-jepozm5pw/'+filename+'_'+session['email']+'.doc',as_attachment=True)
此外,我还公开访问了所有文件。当我将其输入浏览器时,我也可以下载提供的链接。当我在烧瓶中实施它时,努力是徒劳的。可能是什么错误?