go to post Huicai Wang · Apr 21, 2021 1. 通过%NetRequest类获得图片 2. 通过下面方法得到图片的Base64流 ClassMethod Img2Base64(imgDataStream) As %Stream.GlobalCharacter { Set sgc = ##class(%Stream.GlobalCharacter).%New() set byteList = imgDataStream.Read(12288) while(byteList'=""){ set baseStr = ##class(%SYSTEM.Encryption).Base64Encode(byteList) do sgc.Write(baseStr) set byteList = "" set byteList = img.Read(12288) } do imgDataStream.%Close() set imgDataStream="" quit sgc }