lang 4 жил өмнө
parent
commit
712da188bf

+ 3 - 0
Controller/CloudStorage.py

@@ -355,6 +355,8 @@ class CloudStorageView(View):
                     aws_secret_access_key='ckYLg4Lo9ZXJIcJEAKkzf2rWvs8Xth1FCjqiAqUw',
                     region_name=REGION_NAME
                 )
+                print('----------test')
+                print(REGION_NAME)
                 Policy = {
                     "Version": "2012-10-17",
                     "Statement": [
@@ -366,6 +368,7 @@ class CloudStorageView(View):
                         }
                     ]
                 }
+                print(Policy)
                 response = boto3_sts.get_federation_token(
                     Name='{role_name}'.format(role_name=uid + '_' + channel),
                     Policy=json.dumps(Policy),

+ 1 - 1
Controller/TestApi.py

@@ -701,7 +701,7 @@ class testView(View):
         client = session.client("s3")
         bucket = "asj-oct-ipc" # 【你 bucket 的名字】 # 首先需要保.证 s3 上已经存在该存储桶,否则报错
         upload_data = open("./././static/log/error.log", "rb")
-        upload_key = "test"
+        upload_key = "86YC8Z192VB1VMKU111A/vod1/test"
         file_obj = s3.Bucket(bucket).put_object(Key=upload_key, Body=upload_data)
         print('--------')
         print(file_obj)