SharePoint Error: The server does not allow messages larger than 2097152 bytes

后端 未结 4 2057
渐次进展
渐次进展 2021-02-19 09:08

I have web service that point to sharepoint 2013 Office 365. I use the client object model. I am trying to update the xml file which stores 4 attachments in it. When I do thi

4条回答
  •  孤独总比滥情好
    2021-02-19 09:25

    I have just encountered this issue in SharePoint 2013 and after looking through the docs it states:

    Content property on the FileCreationInformation class. Maximum file size that can be uploaded is 2 MB. Time-out occurs after 30 minutes. Use to upload files that are less than 2 MB only.

    However if you set the ContentStream property, you don't hit the same document size limit. The documentation states:

    ContentStream property on the FileCreationInformation class. No file size limits. Time-out occurs after 30 minutes. Recommended for: - SharePoint Server 2013. - SharePoint Online when the file is smaller than 10 MB.

    There are some other options detailed within the documentation, but hopefully this will help other people that have encountered this very same problem.

提交回复
热议问题