diff --git a/pom.xml b/pom.xml index c09e70e..89f750c 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.zxbu webdav-teambition - 0.0.1-SNAPSHOT + 0.0.2-SNAPSHOT webdav-teambition Demo project for Spring Boot diff --git a/src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java b/src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java index 2ceda4f..9447ef3 100644 --- a/src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java +++ b/src/main/java/com/github/zxbu/webdavteambition/store/TeambitionFileSystemStore.java @@ -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;