You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Attachments: Delete

DeleteAttachment is used to remove an attachment from a database.

Syntax

void DeleteAttachment(string key, Etag etag);

Parameters
key string key of an attachment to delete
etag Etag current attachment etag, used for concurrency checks (null to skip check)

Example

store
	.DatabaseCommands
	.DeleteAttachment("albums/holidays/sea.jpg", null);