Minimum version: Midgard 1.4 (Bifrost)
Deletes the attachment name to the record represented by the object. Only the owner of the record can delete an attachment to that record.
Returns TRUE on success, FALSE on failure.
<?php $person = mgd_get_person(123); // person with id 123 must exist. // and have an attachment named "photo". if($person->deleteattachment("photo")) { echo "Deleted attachment \"photo\".<br>\n"; } else { echo "Could not delete attachment.<br>\n"; echo "Reason: " . mgd_errstr(); } ?> |
Method available for: article, element, event, event_member, group, host, member, page, pageelement, pagelink, person, preference, sitegroup, snippet, snippetdir, style and topic objects.