PrivateBin\Model\Paste::setAttachment PHP Method

setAttachment() public method

Set paste's attachment.
public setAttachment ( string $attachment ) : void
$attachment string
return void
    public function setAttachment($attachment)
    {
        if (!$this->_conf->getKey('fileupload') || !Sjcl::isValid($attachment)) {
            throw new Exception('Invalid attachment.', 71);
        }
        $this->_data->meta->attachment = $attachment;
    }