chat_input(accept_file=True, file_type=["jpg", "jpeg", "png", "mp4", "mov"]) returns 406 for images

I am using python streamlit library.
I have chat initiated like in the title - chat_input(accept_file=True, file_type=["jpg", "jpeg", "png", "mp4", "mov"])

It is deployed on 1 instance on kubernetes. When I test it and upload a video file it usually works, sometimes I get 400 invalid-session but that is fine - i found some information about this.

However I can’t upload any image. I get 406 every time.
What am I missing?

Edit:
I found a funny scenario:

  1. try to upload an image
  2. it fails with 406
  3. send it on slack to someone
  4. download that exact image from slack
  5. try to upload it
  6. it works ?!
    I did compare the original image and the new one using different method, chatgpt says they have identical metadata and are pixel wise identical. However I found that at the end of the files bytes differ between them and thats the only difference.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.