temporaryStorage.getFile(imageField.getFileId())

上传这样获取的File和new File(path)的不一样,无法上传到云

String localPath = "C:\\Users\\drago\\Desktop\\11.jpg";
File file1 = new File(localPath);


        FileBody f = new FileBody(file);
        StringBody c = new StringBody(channel, ContentType.TEXT_PLAIN);

image

临时存储的没有扩展名,只能用inputstream

1 个赞