MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / check_ext

Function check_ext

backend/app/routes/file/utils.py:63–68  ·  view source on GitHub ↗
(purpose_info: PurposeInfo, ext: str)

Source from the content-addressed store, hash-verified

61
62
63def check_ext(purpose_info: PurposeInfo, ext: str):
64 if ext not in purpose_info.allow_file_formats:
65 raise_request_validation_error(
66 f"File format is not supported, supported formats: {', '.join(purpose_info.allow_file_formats.keys())}"
67 )
68 return purpose_info.allow_file_formats[ext]

Callers 2

upload_imageFunction · 0.90
api_upload_fileFunction · 0.90

Calls 1

Tested by

no test coverage detected