PrivateBin\Model\Paste::setAttachmentName PHP Method

setAttachmentName() public method

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