You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class example(BaseModel):
file: flask_openapi3.FileStorage
that generates a file upload form within e.g. swagger. Now I'd like to declare a list of allowed mime-types, that are checked by pydantic and are also used by the OS file-chooser to restrict shown files.
I wasn't able to find any information on how to do so, thus I'm seeking for help through this issue.
I can easily add an additional field file_type: Literal["image/png"] = Field(default="image/png"), but this will only show an additional selection field, which does not influence the OSs file chooser or validation of the file within the FileStorage.