0

My SharePoint 2013のバージョンは15.0.4569.1506です。 CMISコードの下にあるSharePointで37 MBを超えるドキュメントをアップロードできません。しかしSharePointに直接私はそうすることができます。私はまたヒープサイズ/キャッシュの限界を増やしてみました。SharePoint 2013のCMIS APIを介して37 MBを超えるドキュメントをアップロードできない

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); 

私はバインディングのAtomPubを使用しました: 'が見つかりCmisRuntimeException' - 私は例外を取得します。私のコードや、変更が必要な他のSharePoint/CMISの設定に何か間違っていますか? org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCodeで を発見(AbstractAtomPubService.java:スレッド "メイン" org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeExceptionで

例外:487) at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:629) at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl .createDocument(ObjectServiceImpl.java:119) at org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:751) at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument (FolderImpl.java:95) at org.apach e.chemistry.opencmis.client.runtime.FolderImpl.createDocument UploadLargeFile.mainで(FolderImpl.java:469) (UploadLargeFile.java:31)

この第31行は、「ドキュメントsomeDocは= someFolder.createDocument(に対応

props、contentStream、versioningState); "

+0

stacktraceの完全な例外は何ですか? – Gagravarr

+0

添付の例外を見つけてください –

+0

アップロードの制限がある場合は、IISの設定を確認してください。 37 MBの文書は、50 MBのPOST要求と一致します。 –

答えて

1

3箇所でweb.configファイルの最大許容限度をチェックしてください:この問題を解決するために

、あなたはTARGETファーム上の3箇所でmaxRequestLength値を大きくする必要があります。

  • の全体管理Web.configファイル(通常はC:¥Inetpub¥wwwroot¥wss¥VirtualDirectories¥DirectoryNameにあります)

  • WebアプリケーションのメインWeb.configファイル(通常はC:\ Inetpub \ wwwroot \ wss \ VirtualDirectories \ Directoryにあります)名)。位置

  • コンテンツ展開web.configファイル: C:\ Program Files \ Commonファイル\ Microsoft共有\ Webサーバー拡張機能15 \ TEMPLATEを\のADMIN \のコンテンツ展開\

オープンweb.configファイル各場所に配置されたファイルを検索し、maxRequestLength属性を探します。あなたが持っている最大のCABファイルのアップロードを可能にするためにそれを増やしてください。既定の設定では、アップロードファイルのサイズは、CAおよびWebアプリケーションの場合は51200 KB、コンテンツ展開の場合は102400 KBに制限されています。

<configuration> 
    <system.web> 
    <httpRuntime maxRequestLength=”102400″ /> 
    </system.web> 
</configuration> 
関連する問題