Skip to content

Commit c038691

Browse files
authored
Adding DELETE sample for Attachment Files
1 parent 7f2217e commit c038691

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/sp-add-ins/working-with-folders-and-files-with-rest.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,14 @@ X-RequestDigest: "{form_digest_value}"
336336
"Contents of file"
337337
```
338338

339+
The following example shows how to **delete a file that is attached to a list item**.
340+
341+
```http
342+
DELETE https://{site_url}/_api/web/lists/getbytitle('{list_title}')/items({item_id})/AttachmentFiles('{file_name}')
343+
Authorization: "Bearer " + accessToken
344+
Accept: "application/json;odata=verbose"
345+
```
346+
339347
## See also
340348

341349
- [Get to know the SharePoint REST service](get-to-know-the-sharepoint-rest-service.md)

0 commit comments

Comments
 (0)