Skip to content

added pasting of images and correct image format handling#221

Open
danieltallentire wants to merge 2 commits intoDoriandarko:mainfrom
danieltallentire:add-image-pasting
Open

added pasting of images and correct image format handling#221
danieltallentire wants to merge 2 commits intoDoriandarko:mainfrom
danieltallentire:add-image-pasting

Conversation

@danieltallentire
Copy link
Copy Markdown

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