oss文件转化成流

    public InputStream getObjectStream(String key) {

        OSSObject object = client.getObject(new GetObjectRequest(properties.getAliOssBucketName(), key));

        InputStream inputStream = object.getObjectContent();

        return inputStream;
    }

可以将oss的地址转成流进行操作

posted @ 2020-10-21 20:31  King-DA  阅读(2597)  评论(0编辑  收藏  举报