无法通过javascript中的REST API CSOM将文件附加到列表项 [英] Unable to attach a file to the list item through REST API CSOM in javascript

查看:103
本文介绍了无法通过javascript中的REST API CSOM将文件附加到列表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当我们尝试使用JavaScript CSOM REST API将文件附加到列表项时,出现以下错误.

"<?xml version = \"1.0 \" encoding = \"utf-8 \"?< m:error xmlns:m = \"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata \" < m:code> -1,Microsoft.SharePoint.Client.ResourceNotFoundException</m:code>< m:消息 xml:lang = \"en-US \">找不到请求AttachmentFiles的资源.</m:message>//m:error>"

"<?xml version=\"1.0\" encoding=\"utf-8\"?><m:error xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"><m:code>-1, Microsoft.SharePoint.Client.ResourceNotFoundException</m:code><m:message xml:lang=\"en-US\">Cannot find resource for the request AttachmentFiles.</m:message></m:error>"

请让我知道它的可能原因.非常感谢

关于

柴塔尼亚.

推荐答案



首先,您需要保存Item,然后获取ItemID,然后使用REST将附件添加到同一Item.

您可以找到以下链接以供参考.

Hi ,

First you need to save the Item and then get the ItemID and add the attachment to the same Item using REST.

You can find the below link for reference.

http://sharepointkitchen.blogspot.in/2014/12/add-attachment-to-list-item-using-rest.html


这篇关于无法通过javascript中的REST API CSOM将文件附加到列表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆