func (db *DB) GetAttachment(ctx context.Context, docID, rev, filename string) (*Attachment, error) {
	cType, md5sum, body, err := db.driverDB.GetAttachment(ctx, docID, rev, filename)
	if err != nil {
		return nil, err
	}
	return &Attachment{
		ReadCloser:  body,
		Filename:    filename,
		ContentType: cType,
		MD5:         MD5sum(md5sum),
	}, nil
}
// GetAttachment returns a file attachment associated with the document.
GetAttachment returns a file attachment associated with the document.
// GetAttachment returns a file attachment associated with the document .
func (db *DB) GetAttachment(ctx context.Context, docID, rev, filename string) (*Attachment, error) {
	cType, md5sum, body, err := db.driverDB.GetAttachment(ctx, docID, rev, filename)
	if err != nil {
		return nil, err
	}
	return &Attachment{
		ReadCloser:  body,
		Filename:    filename,
		ContentType: cType,
		MD5:         MD5sum(md5sum),
	}, nil
}
func ( db * DB ) GetAttachment ( ctx context . Context , docID , rev , filename string ) ( * Attachment , error ) { cType , md5sum , body , err := db . driverDB . GetAttachment ( ctx , docID , rev , filename ) if err != nil { return nil , err } return & Attachment { ReadCloser : body , Filename : filename , ContentType : cType , MD5 : MD5sum ( md5sum ) , } , nil }
GetAttachment returns a file attachment associated with the document.
GetAttachment returns a file attachment associated with the document .