Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added pasting of images and correct image format handling #221

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

danieltallentire
Copy link

This pull request includes enhancements to handle image uploads more effectively in the chat application. The changes primarily focus on capturing and processing the media type of images, as well as handling pasted images in the chat interface.

Enhancements to image handling:

  • app.py: Added support to capture the media type of images from the request data and use it when creating the message content.

  • static/js/chat.js:

    • Added an event listener to handle pasted images, convert them to base64, and update the preview with the correct media type.
    • Modified the image preview in the chat to use the correct media type when displaying images.
    • Updated the form submission to include the media type of the image in the request payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants