java - FileUtils.copyInputStreamToFile保存文件时怎么设置保存类型
PHPz
PHPz 2017-04-17 13:09:35
0
1
855

直接这样保存,文件类型成了application/octet-stream 二进制了

FileUtils.copyInputStreamToFile(file.getInputStream(), imageSaveFile);

有没有设置保存类型的

PHPz
PHPz

学习是最好的投资!

reply all(1)
巴扎黑

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template