How to add GIF, BMP, and other image files to XML Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiMultimedia/html/delphi_20060928214219282.html
As the question!
For example:
<Image>
Gif89a ....?....} Between M? Hot ?.. F then f... G then... _ PD then? Why? 5B !!?.....,.......... FP ?? 4 temple .? Why? 7. What are the vulnerabilities ?. C <too many. Why 8... why? @. #. Why P.../Why je? Wait... wait 8 minutes until then h $ .? ZB zookeeper vxz {B zookeeper ?.;
</Image>
Put in CDATA segment
In addition to XML, idhttp also includes the following parts:
Content-Type: image/GIF
Content-transfer-encoding: 8bit
Content-ID: test.gif
Content-location: test.gif
Gif89a ....?....} Between M? Hot ?.. F then f... G then... _ PD then? Why? 5B !!?.....,.......... FP ?? 4 temple .? Why? 7. What are the vulnerabilities ?. C <too many. Why 8... why? @. #. Why P.../Why je? Wait... wait 8 minutes until then h $ .? ZB zookeeper vxz {B zookeeper ?.;
Therefore, the above question is: it is impossible to use base64 encoding, and the server cannot modify it. data can only be transmitted in the preceding way.
At the same time, video and audio are also implemented through the above method. How can this problem be solved ??
You can use base64 encoding to save these images as text and put them in XML. When necessary, you can decode the base64 in XML, but why store images, videos, and other things in XML files? It seems that this is not a good idea. Isn't it better to store files directly?
Base64 encoding ~
"So the above question is: base64 encoding is not allowed, and the server cannot modify it. data can only be transmitted in the above way ."
Dear bosses, the server is an existing platform and cannot be modified. If base64 is used, the server needs to be decoded.
In addition, the server needs to use HTTP to transmit the data, instead of storing the data to a file and then transmitting images and video files.
actually, I understand the soap communication with attachments. Are you familiar with mime?