mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-14 02:55:07 +08:00
修复上传七牛云无mime type问题
This commit is contained in:
@ -25,7 +25,7 @@ public class FtpFileClientTest {
|
||||
// 上传文件
|
||||
String path = IdUtil.fastSimpleUUID() + ".jpg";
|
||||
byte[] content = ResourceUtil.readBytes("file/erweima.jpg");
|
||||
String fullPath = client.upload(content, path);
|
||||
String fullPath = client.upload(content, path, "image/jpeg");
|
||||
System.out.println("访问地址:" + fullPath);
|
||||
if (false) {
|
||||
byte[] bytes = client.getContent(path);
|
||||
|
@ -19,7 +19,7 @@ public class LocalFileClientTest {
|
||||
// 上传文件
|
||||
String path = IdUtil.fastSimpleUUID() + ".jpg";
|
||||
byte[] content = ResourceUtil.readBytes("file/erweima.jpg");
|
||||
String fullPath = client.upload(content, path);
|
||||
String fullPath = client.upload(content, path, "image/jpeg");
|
||||
System.out.println("访问地址:" + fullPath);
|
||||
client.delete(path);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class S3FileClientTest {
|
||||
// 上传文件
|
||||
String path = IdUtil.fastSimpleUUID() + ".jpg";
|
||||
byte[] content = ResourceUtil.readBytes("file/erweima.jpg");
|
||||
String fullPath = client.upload(content, path);
|
||||
String fullPath = client.upload(content, path, "image/jpeg");
|
||||
System.out.println("访问地址:" + fullPath);
|
||||
// 读取文件
|
||||
if (true) {
|
||||
|
@ -23,7 +23,7 @@ public class SftpFileClientTest {
|
||||
// 上传文件
|
||||
String path = IdUtil.fastSimpleUUID() + ".jpg";
|
||||
byte[] content = ResourceUtil.readBytes("file/erweima.jpg");
|
||||
String fullPath = client.upload(content, path);
|
||||
String fullPath = client.upload(content, path, "image/jpeg");
|
||||
System.out.println("访问地址:" + fullPath);
|
||||
if (false) {
|
||||
byte[] bytes = client.getContent(path);
|
||||
|
Reference in New Issue
Block a user