Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Conversation

@kravetsmic
Copy link
Contributor

Summary

Added validation for text files in test API. If the user sends text files to the file endpoint, or files to the text file endpoint, he will get exception from server with message Type {file_content_type} not supported for files / text files endpoint. and status code 400.

Added additional tests.


Closes issue #106

Copy link
Contributor

@cragwolfe cragwolfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually addressing the ordering issue in #106 .

As a change on its own, I also think this change is too restrictive, and the API is better of being less opiniated. E.g., a file sent with the files parameter could be any mimetype, inclluding text/plain.

on the other hand, in the text_files case, there are quite a few more valid plain text mimetypes floating around out there (e.g. html, xml, ...). so, i think for now it is better not to try to enumerate them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants