fix bug: 支持0字节文件上传
This commit is contained in:
parent
bb20fc8d41
commit
892dbc21f9
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
|||
</parent>
|
||||
<groupId>com.github.zxbu</groupId>
|
||||
<artifactId>webdav-teambition</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>0.0.2-SNAPSHOT</version>
|
||||
<name>webdav-teambition</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
|
|
|
@ -88,8 +88,8 @@ public class TeambitionFileSystemStore implements IWebdavStore {
|
|||
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = requestAttributes.getRequest();
|
||||
int contentLength = request.getContentLength();
|
||||
if (contentLength <= 0) {
|
||||
return 0;
|
||||
if (contentLength < 0) {
|
||||
contentLength = 0;
|
||||
}
|
||||
teambitionClientService.uploadPre(resourceUri, contentLength, content);
|
||||
return contentLength;
|
||||
|
|
Loading…
Reference in New Issue