dify icon indicating copy to clipboard operation
dify copied to clipboard

Add base64 encoded image dumping function

Open guoshiqiufeng opened this issue 1 year ago • 1 comments

Self Checks

  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I request a third-party service through the Http request component, which returns a base64-encoded image, and then I need to continue to manipulate this image, so I'd like to add base64-encoded image dumping functionality.

2. Additional context or comments

image

3. Can you help us with this feature?

  • [ ] I am interested in contributing to this feature.

guoshiqiufeng avatar Oct 25 '24 01:10 guoshiqiufeng

Can you tell me a bit more about how you want to "continue to manipulate this image"?


You can use a code block to convert and upload it to somewhere if you really need.

Also, another choice you can format it a little bit, Dify markdown render should easily display it. Below is a sample one:

![Red and Blue](data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAwIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB4PSIxMCIgeT0iMTAiIHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCIgZmlsbD0iI2ZmMDAwMCIvPgogIDxyZWN0IHg9IjExMCIgeT0iMTAiIHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCIgZmlsbD0iIzAwMDBmZiIvPgo8L3N2Zz4=)

image

alterxyz avatar Oct 26 '24 16:10 alterxyz

I need to use the image returned by the request to call other interfaces, but because the interface to return the image base64 is too large, not good with the code to convert (there will be characters too long), so I want to save as a file, in the file to call other interfaces. Similar operations, there are several related interfaces currently in use, you can query the interface documentation:https://github.com/Zeyi-Lin/HivisionIDPhotos/blob/master/docs/api_EN.md

guoshiqiufeng avatar Oct 28 '24 01:10 guoshiqiufeng

It's been accomplished temporarily through other means.

guoshiqiufeng avatar Oct 31 '24 02:10 guoshiqiufeng

It's been accomplished temporarily through other means.它暂时通过其他方式完成了。

Hey!the same question.Could u tell me how to do it?I get image base64 by http node.And I need send the image to LLM node .

wow-ww avatar Dec 31 '24 06:12 wow-ww