我正在使用spring编写一个Web服务.
此服务将base64编码的图像作为String参数.
我想将此String解码为图像并上传到服务器.
@RequestMapping(value="/uploadImage",method = RequestMethod.POST)
public @ResponseBody String uploadImage(@RequestParam("encodedImage") String encodedImage)
{
byte[] imageByte= Base64.decodeBase64(encodedImage);
return null;
}
Run Code Online (Sandbox Code Playgroud) spring ×1