优化调整
This commit is contained in:
parent
435b87a54b
commit
dfb2016961
@ -139,7 +139,6 @@ public class WebFileController {
|
||||
.bizScene(bizScene)
|
||||
.fileName(fileName)
|
||||
.tgtFileKey(tgtFileKey)
|
||||
.fileContent(file.getInputStream())
|
||||
.file(file)
|
||||
.uploadId(uploadId)
|
||||
.build();
|
||||
|
||||
@ -221,8 +221,6 @@ public class AliOssServiceImpl implements AliOssService {
|
||||
// 分片上传uploadId
|
||||
partRequest.setUploadId(uploadId);
|
||||
// 分片文件
|
||||
//InputStream inputStream = new ByteArrayInputStream(fileContent);
|
||||
//inputStream.skip(startPos);
|
||||
// 跳过已经上传的分片。
|
||||
InputStream inputStream = file.getInputStream();
|
||||
inputStream.skip(startPos);
|
||||
|
||||
@ -33,8 +33,6 @@ public class MultipartUploadFileDto {
|
||||
@NotBlank
|
||||
private String tgtFileKey;
|
||||
|
||||
private InputStream fileContent;
|
||||
|
||||
private MultipartFile file;
|
||||
|
||||
/**
|
||||
|
||||
@ -185,7 +185,7 @@ public class FileServiceImpl implements FileService {
|
||||
public MultipartUploadFileResponse multipartUploadFile(MultipartUploadFileDto dto) {
|
||||
FileUploadConfig fileUploadConfig = getFileUploadConfig(dto.getAppCode(), dto.getBizScene());
|
||||
// 判断容量
|
||||
isFileConform(fileUploadConfig, (int)dto.getFile().getSize(), dto.getFileName());
|
||||
isFileConform(fileUploadConfig, (int)dto.getFile().getSize() / 10 , dto.getFileName());
|
||||
|
||||
List<PartETag> partETags = fileManager.multipartUploadFile(fileUploadConfig.getBucketName(),
|
||||
dto.getTgtFileKey(), dto.getFile(), dto);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user