如何将blob url转换为图像字符串

时间:2016-02-28 14:21:23

标签: java spring jsp spring-mvc

我想在aws存储桶中保存图像我在JSP页面中从文件上传图像时得到此URL

 blob:http%3A//localhost/7555f111-bb1e-4d3d-90c6-0bb14875e25a

我有这段代码:

public String uploadImageToS3(String uri,String image)
{
   try{

     File file = createFileForS3(image);
        S3StreamUpload s3 =new S3StreamUpload();
        String result = s3.fileUploader("rosh-haayin-images",uri,file.getAbsolutePath());
        if(result.equals("unsuccess"))
        {
         status="-1";
        }
           System.out.println(result);

       } catch(Exception e){
           System.out.println(e.getMessage());
           status="-1";
       }
return status;

}

我想使用那个src获取图像或文件以便在fanctioin中使用它如何将其转换为图像字符串或文件?

0 个答案:

没有答案