Skip to content

Commit bc83158

Browse files
committed
Add the shape of the presigned data
1 parent a9fa38d commit bc83158

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

styleguide_example/integrations/aws/client.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,24 @@ def s3_generate_presigned_post(*, file_path: str, file_type: str) -> Dict[str, A
6161
acl = credentials.default_acl
6262
expires_in = credentials.presigned_expiry
6363

64+
"""
65+
TODO: Create a type for the presigned_data
66+
It looks like this:
67+
68+
{
69+
'fields': {
70+
'Content-Type': 'image/png',
71+
'acl': 'private',
72+
'key': 'files/bafdccb665a447468e237781154883b5.png',
73+
'policy': 'some-long-base64-string',
74+
'x-amz-algorithm': 'AWS4-HMAC-SHA256',
75+
'x-amz-credential': 'AKIASOZLZI5FJDJ6XTSZ/20220405/eu-central-1/s3/aws4_request',
76+
'x-amz-date': '20220405T114912Z',
77+
'x-amz-signature': '7d8be89aabec12b781d44b5b3f099d07be319b9a41d9a9c804bd1075e1ef5735'
78+
},
79+
'url': 'https://django-styleguide-example.s3.amazonaws.com/'
80+
}
81+
"""
6482
presigned_data = s3_client.generate_presigned_post(
6583
credentials.bucket_name,
6684
file_path,

0 commit comments

Comments
 (0)