Skip to content

Commit

Permalink
Merge branch 'test'
Browse files Browse the repository at this point in the history
  • Loading branch information
Darveivoldavara committed Jan 8, 2024
2 parents ed4fb03 + b55159e commit d1cfd58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
- Для отправки изображения в очередь (post-запрос) — `/upload` — подгружает фотографию в сервис и возвращает task_id для использования в get-запросе
- Пример отправки в сервис вашего конкретного изображения, находящегося по пути *path_to_your_image.jpg*

`curl -X POST -F "file=@path_to_your_image.jpg" http://localhost:8000/upload`
`curl -X GET -F "file=@path_to_your_image.jpg" http://localhost:8000/`
- Для получения результата распознавания (get-запрос) — `/result/{task_id}` — возвращает результат в формате JSON

---
Expand Down
2 changes: 1 addition & 1 deletion app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def upload(file: UploadFile):
status_code=400, detail="No file extension found. Check file name"
)

file_name, file_ext = file.filename.rsplit(".", maxsplit=1)
file_ext = file.filename.rsplit(".", maxsplit=1)[1]

if file_ext.lower() not in ALLOWED_EXTENSION:
raise HTTPException(
Expand Down

0 comments on commit d1cfd58

Please sign in to comment.