编号:ZSSAC-163 描述:修改文件上传接口
This commit is contained in:
parent
2f77f047a5
commit
b5d583e9bc
@ -136,6 +136,7 @@ public class SysOssController extends BaseController
|
|||||||
throw new FileSizeLimitExceededException(defaultMaxSize / 1024 / 1024);
|
throw new FileSizeLimitExceededException(defaultMaxSize / 1024 / 1024);
|
||||||
}
|
}
|
||||||
SysOss oss = sysOssService.upload(file);
|
SysOss oss = sysOssService.upload(file);
|
||||||
|
oss.setSize(file.getSize());
|
||||||
return R.ok(oss);
|
return R.ok(oss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,10 @@ public class SysOss extends BaseEntity
|
|||||||
@Excel(name = "服务商")
|
@Excel(name = "服务商")
|
||||||
private String service;
|
private String service;
|
||||||
|
|
||||||
|
/** 文件大小 */
|
||||||
|
@Excel(name = "文件大小")
|
||||||
|
private Long size;
|
||||||
|
|
||||||
public void setId(String id)
|
public void setId(String id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
@ -119,6 +123,13 @@ public class SysOss extends BaseEntity
|
|||||||
{
|
{
|
||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
public Long getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSize(Long size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
@ -135,6 +146,7 @@ public class SysOss extends BaseEntity
|
|||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("service", getService())
|
.append("service", getService())
|
||||||
|
.append("size",getSize())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user