This function completely wipes attachment from Zendesk Helpdesk article.

        :param article_attachment: :class:`ArticleAttachment` object or numeric article attachment id.
        :return: status_code == 204 on success
430836
def delete(self, article_attachment):
        
        return HelpdeskAttachmentRequest(self).delete(self.endpoint.delete, article_attachment)
1008759
def attachment_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/attachments/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
1037139
public void removeWikiLinkMarkup(StringBuilder article, String title) {
        int bracketStart = article.indexOf("[[");
        boolean includeLinkText = 
            options.contains(CleanerOption.INCLUDE_LINK_TEXT);
        while (bracketStart >= 0) {
            
            // grab the linked article name which is all text to the next ]], or
            // to
            int bracketEnd = article.indexOf("]]", bracketStart);
            // If there wasn't a matching closing bracket (i.e. malformatted
            // wiki), then abort the replacement
            if (bracketEnd < 0)
                break;
            
            // If the link text is supposed to be included in the document, then
            // strip out the pertinent text.  However, ensure that the link
            // points to an article, which filters out non-content links in the
            // article headers and footers
            if (includeLinkText && 
                isArticleLink(article.substring(bracketStart+2, 
                                                bracketEnd), title)) {

                // the link may also have a text description that replaces the
                // link text, e.g.  [[article title|link text]].
                int optionalLinkDescriptionStart = 
                    article.indexOf("|", bracketStart);
                // When selecting the optional text, ensure that the | delimeter
                // falls within the link structure itself
                int linkTextStart = 
                    (optionalLinkDescriptionStart >= 0 && 
                     optionalLinkDescriptionStart < bracketEnd)
                    ? optionalLinkDescriptionStart + 1
                    : bracketStart + 2;
                // Parse out the link text
                String linkText = article.substring(linkTextStart, bracketEnd);
                // Then replace the entire link with the desired text
                article.replace(bracketStart, bracketEnd+2, linkText);
            }
            // If the link text isn't to be used in the document, remove it
            // completely
            else {
                article.delete(bracketStart, bracketEnd + 2);
            }
            bracketStart = article.indexOf("[[", bracketStart);
        }   
    }
1124058
def normalize_attachment(attachment):
        ''' 
        '''
        res = dict()
        res['type'] = 'attachment'
        res['id'] = attachment['id']
        del(attachment['id'])
        res['url'] = attachment['url']
        del(attachment['url'])
        res['metadata'] = attachment
        return res
616136
function cleanDocs(docs) {
  for (var i = 0; i < docs.length; i++) {
    var doc = docs[i];
    if (doc._deleted) {
      delete doc._attachments; // ignore atts for deleted docs
    } else if (doc._attachments) {
      // filter out extraneous keys from _attachments
      var atts = Object.keys(doc._attachments);
      for (var j = 0; j < atts.length; j++) {
        var att = atts[j];
        doc._attachments[att] = pouchdbUtils.pick(doc._attachments[att],
          ['data', 'digest', 'content_type', 'length', 'revpos', 'stub']);
      }
    }
  }
}
664376
public function removeAttachments()
    {
        if (func_num_args() > 0) {
            $indices = is_array(func_get_arg(0)) ? func_get_arg(0) : func_get_args();

            foreach ($indices as $index) {
                unset($this->attachments[$index]);
            }

            $this->attachments = array_values($this->attachments);
        } else {
            $this->attachments = [];
        }

        return $this;
    }
1370342
protected void validateAttachmentContentData(String receivedContent, String controlContent, String controlContentId) {
        if (ignoreAllWhitespaces) {
            controlContent = StringUtils.trimAllWhitespace(controlContent);
            receivedContent = StringUtils.trimAllWhitespace(receivedContent);
        }

        Assert.isTrue(receivedContent.equals(controlContent),
                "Values not equal for attachment content '"
                        + controlContentId + "', expected '"
                        + controlContent.trim() + "' but was '"
                        + receivedContent.trim() + "'");
    }
373056
public function removeArticle()
    {
        if (!\OxidEsales\Eshop\Core\Registry::getSession()->checkSessionChallenge()) {
            return;
        }

        if (!$this->getViewConfig()->getShowListmania()) {
            return;
        }

        if (($sArtId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid')) &&
            ($oRecommList = $this->getActiveRecommList())
        ) {
            $oRecommList->removeArticle($sArtId);
        }
        $this->_sThisTemplate = 'page/account/recommendationedit.tpl';
    }
712038
def post_delete_helper(form_tag=True):
    
    helper = FormHelper()
    helper.form_action = '.'
    helper.attrs = {'data_abide': ''}
    helper.form_tag = form_tag
    
    helper.layout = Layout(
        ButtonHolderPanel(
            Row(
                Column(
                    'confirm',
                    css_class='small-12 medium-8'
                ),
                Column(
                    Submit('submit', _('Submit')),
                    css_class='small-12 medium-4 text-right'
                ),
            ),
        ),
    )
    
    return helper
764920
def destroy
      @news = News.find(params[:id])
      category = @news.category
      @news.destroy
  
      respond_to do |format|
        format.html { redirect_to category_news_index_path(category), notice: 'News was successfully deleted.' }
        format.json { head :no_content }
      end
    end
141379
function( attachment ) {
			var noChange = ( attachment && this._attachment && attachment.id === this._attachment.id ) || ( ! attachment && ! this._attachment );

			if ( ! attachment ) {
				this._resetContent();

				if ( noChange ) {
					return;
				}

				this.element.val( null );
				this.element.trigger( 'change' );

				if ( 'function' === typeof this.options.clear ) {
					this.options.clear.call( this );
				}

				$( document ).trigger( 'wpMediaPicker.updateField', [ null, this ] );
				return;
			}

			this._createContent( attachment );

			if ( noChange ) {
				return;
			}

			if ( 'url' === this.options.store ) {
				this.element.val( attachment.url );
			} else {
				this.element.val( attachment.id );
			}
			this.element.trigger( 'change' );

			if ( 'function' === typeof this.options.change ) {
				this.options.change.call( this );
			}

			$( document ).trigger( 'wpMediaPicker.updateField', [ attachment, this ] );
		}
498376
def delete(self, count=1):
        
        if self.cursor_position < len(self.text):
            deleted = self.document.text_after_cursor[:count]
            self.text = self.text[:self.cursor_position] + \
                self.text[self.cursor_position + len(deleted):]
            return deleted
        else:
            return ''
1066914
function encodeAttachmentDid(buffer, offset, attachment_data) {
    offset = buffer.writeUInt32LE(attachment_data.status, offset);
    offset += encodeString(buffer, attachment_data.symbol, offset);
    offset += encodeString(buffer, attachment_data.address, offset);
    return offset;
}
587986
def destroy
      @article = Article.find(params[:id])
      category = @article.category
      @article.destroy

      respond_to do |format|
        format.html { redirect_to category_articles_path(category), notice: 'Article was successfully deleted.' }
        format.json { head :no_content }
      end
    end
496473
public void removeAttachment(IAtomBase toRemove) throws CTKException {

    Map<String, IAtomBase> groups = getRgroups();
    for (String key : groups.keySet()) {

      if (groups.get(key).compare(toRemove)) {
        for (int i = 0; i < attachments.size(); i++) {
          if (attachments.get(i).getLabel().equals(key)) {
            attachments.remove(i);
            break;
          }
        }
      }
    }
  }
362768
def attachment_state(self):
        
        state = None
        if self.attach_data:
            state = self.attach_data.status
        return state
943557
def has_unknown_attachment_error(self, page_id):
        
        unknown_attachment_identifier = 'plugins/servlet/confluence/placeholder/unknown-attachment'
        result = self.get_page_by_id(page_id, expand='body.view')
        if len(result) == 0:
            return ""
        body = (((result.get('body') or {}).get('view') or {}).get('value') or {})
        if unknown_attachment_identifier in body:
            return result.get('_links').get('base') + result.get('_links').get('tinyui')
        return ""