If you let users upload files using upload_and_poll()
OpenAI API, risk is that they try to upload unhandled file types.
In that case, there is an exception:
BadRequestError: Error code: 400 - {'error': {'message': 'Files with extensions [.xlsx] are not supported for retrieval. See https://platform.openai.com/docs/assistants/tools/file-search/supported-files', 'type': 'invalid_request_error', 'param': 'file_ids', 'code': 'unsupported_file'}}
BUT the file is still uploaded:
AND this file is not added to the vector store.
So if you just list it (or delete its content automatically) these files won’t get flushed.