Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ class ImageData(BaseModel):
|
|
47 |
url: str
|
48 |
title: str
|
49 |
|
50 |
-
@app.
|
51 |
async def upload_image(data: ImageData):
|
52 |
try:
|
53 |
options = UploadFileRequestOptions(
|
@@ -58,7 +58,7 @@ async def upload_image(data: ImageData):
|
|
58 |
upload = imagekit.upload(
|
59 |
file=data.url,
|
60 |
file_name="image.jpg",
|
61 |
-
options=options
|
62 |
)
|
63 |
|
64 |
# Return the upload response
|
|
|
47 |
url: str
|
48 |
title: str
|
49 |
|
50 |
+
@app.get("/image_upload")
|
51 |
async def upload_image(data: ImageData):
|
52 |
try:
|
53 |
options = UploadFileRequestOptions(
|
|
|
58 |
upload = imagekit.upload(
|
59 |
file=data.url,
|
60 |
file_name="image.jpg",
|
61 |
+
#options=options
|
62 |
)
|
63 |
|
64 |
# Return the upload response
|