Spaces:
Sleeping
Sleeping
Commit
·
403ee22
1
Parent(s):
ea5a996
fix: wrong request object type/schema
Browse files
app.py
CHANGED
@@ -98,7 +98,7 @@ async def upload(
|
|
98 |
|
99 |
|
100 |
@app.post("/image2")
|
101 |
-
async def
|
102 |
x_request_user: str = Header(...),
|
103 |
x_api_key: str = Header(...),
|
104 |
x_job_no: str = Header(...),
|
@@ -125,7 +125,7 @@ async def upload(
|
|
125 |
|
126 |
# Upload file object to S3
|
127 |
# logging.info(f"Uploading file to S3 bucket '{AWS_S3_BUCKET_NAME}' with key '{key}'")
|
128 |
-
res = s3client.upload_file(AWS_S3_BUCKET_NAME,
|
129 |
logging.info("File uploaded successfully")
|
130 |
|
131 |
except Exception as e:
|
|
|
98 |
|
99 |
|
100 |
@app.post("/image2")
|
101 |
+
async def upload2(
|
102 |
x_request_user: str = Header(...),
|
103 |
x_api_key: str = Header(...),
|
104 |
x_job_no: str = Header(...),
|
|
|
125 |
|
126 |
# Upload file object to S3
|
127 |
# logging.info(f"Uploading file to S3 bucket '{AWS_S3_BUCKET_NAME}' with key '{key}'")
|
128 |
+
res = s3client.upload_file(AWS_S3_BUCKET_NAME, file, key)
|
129 |
logging.info("File uploaded successfully")
|
130 |
|
131 |
except Exception as e:
|