@ -84,16 +84,18 @@ public class TeambitionFileSystemStore implements IWebdavStore {
@@ -84,16 +84,18 @@ public class TeambitionFileSystemStore implements IWebdavStore {
LOGGER . info ( "setResourceContent {}" , resourceUri ) ;
ServletRequestAttributes requestAttributes = ( ServletRequestAttributes ) RequestContextHolder . getRequestAttributes ( ) ;
HttpServletRequest request = requestAttributes . getRequest ( ) ;
String expect = request . getHeader ( "Expect" ) ;
// 支持大文件上传
if ( "100-continue" . equalsIgnoreCase ( expect ) ) {
return 0 ;
}
int contentLength = request . getContentLength ( ) ;
if ( contentLength < 0 ) {
contentLength = 0 ;
}
if ( contentLength = = 0 ) {
String expect = request . getHeader ( "Expect" ) ;
// 支持大文件上传
if ( "100-continue" . equalsIgnoreCase ( expect ) ) {
return 0 ;
}
}
teambitionClientService . uploadPre ( resourceUri , contentLength , content ) ;
return contentLength ;
}