开发者

Is it possible to return a set of image binaries within a single JSON message to browser?

开发者 https://www.devze.com 2023-01-30 00:48 出处:网络
From the point of view of uploading, we can use MIME multipart to carry multiple files within a single request. I\'m wondering if it is possible for a web server returning set of images (binaries) thr

From the point of view of uploading, we can use MIME multipart to carry multiple files within a single request. I'm wondering if it is possible for a web server returning set of images (binaries) through a single JSON me开发者_StackOverflow社区ssage to the browser at the client side? If so, is it able to be demuxed and rendered by the browser as retrieving multiple images by using tags?

Please advise.

Thanks & regards, William


You can use base64 to encode the image and included in json. Then use data scheme URI to retrive the image.

More about data scheme URI. http://en.wikipedia.org/wiki/Data_URI_scheme

0

精彩评论

暂无评论...
验证码 换一张
取 消