File upload 无法通过SharePoint 2013中的CMIS API上载大于37 MB的文档
我的SharePoint 2013版本是15.0.4569.1506。我无法通过下面的CMIS代码在SharePoint中上载大于37 MB的文档。但直接进入SharePoint,我就能做到这一点。我还尝试增加堆大小/缓存限制。我得到一个异常-'CmisRuntimeException:Found'File upload 无法通过SharePoint 2013中的CMIS API上载大于37 MB的文档,file-upload,sharepoint-2013,large-files,opencmis,apache-chemistry,File Upload,Sharepoint 2013,Large Files,Opencmis,Apache Chemistry,我的SharePoint 2013版本是15.0.4569.1506。我无法通过下面的CMIS代码在SharePoint中上载大于37 MB的文档。但直接进入SharePoint,我就能做到这一点。我还尝试增加堆大小/缓存限制。我得到一个异常-'CmisRuntimeException:Found' Folder someFolder = (Folder) session.getObjectByPath("/TestFolder"); File file = new File("C:/User
Folder someFolder = (Folder) session.getObjectByPath("/TestFolder");
File file = new File("C:/Users/Administrator/Desktop/50MBFile.zip");
String fileName = file.getName();
Map<String, Object> props = new HashMap<String, Object>();
props.put("cmis:objectTypeId", "cmis:document");
props.put("cmis:name",fileName);
String mimetype = "application/octet-stream";
ContentStream contentStream = session.getObjectFactory().createContentStream(fileName,
file.length(),
mimetype,
new FileInputStream(file));
VersioningState versioningState = null;
Document someDoc = someFolder.createDocument(props, contentStream, versioningState );
foldersomefolder=(Folder)session.getObjectByPath(“/TestFolder”);
File File=新文件(“C:/Users/Administrator/Desktop/50MBFile.zip”);
字符串文件名=file.getName();
Map props=newhashmap();
props.put(“cmis:objectTypeId”、“cmis:document”);
put(“cmis:name”,fileName);
字符串mimetype=“应用程序/八位字节流”;
ContentStream ContentStream=session.getObjectFactory().createContentStream(文件名,
file.length(),
mimetype,
新文件输入流(文件));
VersioningState VersioningState=null;
Document someDoc=someFolder.createDocument(props、contentStream、versioningState);
我使用了AtomPub绑定。我的代码或任何其他SharePoint/CMIS设置中是否存在需要更改的错误
线程“main”org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException中的异常:已找到
位于org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomSubservice.convertStatusCode(AbstractAtomSubservice.java:487)
位于org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomSubservice.post(AbstractAtomSubservice.java:629)
位于org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.createDocument(ObjectServiceImpl.java:119)
位于org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:751)
位于org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:95)
位于org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:469)
位于UploadLargeFile.main(UploadLargeFile.java:31)
其中第31行对应于“Document someDoc=someFolder.createDocument(props、contentStream、versioningState);”在3个位置检查web.config文件中允许的最大限制: 要解决此问题,需要在目标服务器场的三个位置增加maxRequestLength值:
- 管理中心web.config文件(通常位于C:\Inetpub\wwwroot\wss\VirtualDirectories\DirectoryName中)
- web应用程序主web.config文件(通常位于C:\Inetpub\wwwroot\wss\VirtualDirectories\DirectoryName中)
- 内容部署web.config文件位于: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\ADMIN\Content Deployment
<configuration>
<system.web>
<httpRuntime maxRequestLength=”102400″ />
</system.web>
</configuration>
stacktrace的完全异常是什么?请查找附加的异常如果存在上载限制,请检查IIS设置。37 MB的文档与50 MB的POST请求相匹配。在我们的IIS设置中,最大上载大小已设置为1024 MB。我们还试图通过IIS管理器增加连接限制。我也面临同样的问题。可能是cmis限制。请将解决方案或工作区(如有)发布。org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException:不支持重定向(HTTP状态代码302):找到org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomSubservice.convertStatusCode(AbstractAtomSubservice.java:469)org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomSubservice.post(AbstractAtomSubservice.java:661)