Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Url types are not aware of extension during validation #1555

Description

@alaeddine-13

Url types do not perform validation on the url extension. For instance, if a url has extension to an audio file (.wav), ImageURL can still accept it.

in the screenshot below, when a field is defined like this item: Union[ImageUrl, AudioUrl, str], when it is initialized like this : MyClass(item='link to audio') it will be validated against a ImageUrl. This is because ImageUrl considers a .wav file a valid image

Image

Activity

  1. converted this from a draft issue on May 19, 2023
  2. changed the title [-]Url types are not aware of extension during validation[/-] [+]Union over url types: Url types are not aware of extension during validation[/+] on May 19, 2023
  3. changed the title [-]Union over url types: Url types are not aware of extension during validation[/-] [+]Url types are not aware of extension during validation[/+] on May 19, 2023
  4. makram93 commented on May 31, 2023

    @makram93
    Contributor

    pinging to pick this up

  5. moved this from Todo/Bug to In Progress in DocArray backlogon May 31, 2023
  6. linked a pull request that will close this issuefeat: validate file formats in url #1606on Jun 14, 2023
  7. self-assigned this
    on Jun 23, 2023
  8. moved this from In Progress to Done in DocArray backlogon Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions