SharePoint Debug - This file is not a valid presentation file or contains multiple slides...
2014-12-01 16:33
656 查看
今天发现在slide文档库中使用代码保存数据的时候,出现了一个错误:
错误信息为:"This file is not a valid presentation file or contains multiple slides. Only single slides can be stored in a Slide Library. To publish a file with multiple slides, click Upload on the Slide Library, and then click Publish Slides."
保存的代码很简单:
这是因为slide文档库比较特殊,只能保存特定类型的文件
经过尝试,发现可以保存j二进制格式的文件,所以可以把数据保存为二进制格式就可以解决这个问题了:
错误信息为:"This file is not a valid presentation file or contains multiple slides. Only single slides can be stored in a Slide Library. To publish a file with multiple slides, click Upload on the Slide Library, and then click Publish Slides."
保存的代码很简单:
file = folder.Files.Add(fileName, data, true); folder.Update();
这是因为slide文档库比较特殊,只能保存特定类型的文件
经过尝试,发现可以保存j二进制格式的文件,所以可以把数据保存为二进制格式就可以解决这个问题了:
file = folder.Files.Add(fileName, SPTemplateFileType.FormPage); file.SaveBinary(data);
相关文章推荐
- SharePoint Designer Can not perform this operation.The file is no longer checked out or has been del
- Sharepoint Error : The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- SharePoint Designer Check In and Check Out Error – Cannot perform this operation.The file is no longer check out or has been del
- The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- archive for required library could not be read or is not a valid ZIP file
- SharePoint debug - "User or Domain Group Not Found"
- Type Archive for required library: 'C:/Users/EuphemiaShaw/.m2/repository/org/apache/hadoop/hadoop-hdfs/2.6.5/hadoop-hdfs-2.6.5.jar' in project 'mapreduce' cannot be read or is not a valid ZIP file
- 解决java web项目导入后出现的有关问题 -cannot be read or is not a valid ZIP file
- cannot be read or is not a valid ZIP file
- eclipse异常:in project 'xxx' cannot be read or is not a valid ZIP file
- 记一个mvn奇怪错误: Archive for required library: 'D:/mvn/repos/junit/junit/3.8.1/junit-3.8.1.jar' in project 'xxx' cannot be read or is not a valid ZIP file
- the tomcat installation directory is not valid. It is missing excepted file or folder
- maven项目 关于Eclipse报:" cannot be read or is not a valid ZIP file"的解决方案
- Archive for required library: "xxxx" in project '*' cannot be read or is not a valid ZIP file
- cannot be read or is not a valid ZIP file
- fatal error C1853: 'Debug/***.pch' is not a precompiled header file created with this c
- cannot be read or is not a valid ZIP file
- 解决使用maven的java web项目导入后出现的有关问题, -cannot be read or is not a valid zip file
- 解决java web项目出现的有关问题 -cannot be read or is not a valid ZIP file
- 转:Code-blocks are not allowed in this file: Using Server-Side Code with SharePoint