修复上传七牛云无mime type问题

This commit is contained in:
石溪
2022-11-26 19:26:36 +08:00
parent 2d78b02086
commit 7f9fc41555
14 changed files with 15 additions and 14 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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) {

View File

@ -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);