直接这样保存,文件类型成了application/octet-stream 二进制了
application/octet-stream
FileUtils.copyInputStreamToFile(file.getInputStream(), imageSaveFile);
有没有设置保存类型的
学习是最好的投资!
Is imageSaveFile a File object? When creating a file, the type is determined based on the file name suffix, such as xxxx.jpg, then it is a file of jpg image type.
Is imageSaveFile a File object? When creating a file, the type is determined based on the file name suffix, such as xxxx.jpg, then it is a file of jpg image type.