We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c0cedb commit 501d1bcCopy full SHA for 501d1bc
1 file changed
api/main.py
@@ -2,6 +2,7 @@
2
from fastapi.middleware.cors import CORSMiddleware
3
import qrcode
4
import boto3
5
+import os
6
from io import BytesIO
7
8
# Loading Environment variable (AWS Access Key and Secret Key)
@@ -23,7 +24,11 @@
23
24
)
25
26
# AWS S3 Configuration
-s3 = boto3.client('s3')
27
+s3 = boto3.client(
28
+ 's3',
29
+ aws_access_key_id= os.getenv("AWS_ACCESS_KEY"),
30
+ aws_secret_access_key= os.getenv("AWS_SECRET_KEY"))
31
+
32
bucket_name = 'YOUR_BUCKET_NAME' # Add your bucket name here
33
34
@app.post("/generate-qr/")
0 commit comments