Closed helgatheviking closed 1 year ago
Oops... update to say I found:
$factory = new AttachmentFactory(new Filesystem());
$file = $factory->make(__FILE__);
$thread->setAttachments(new Collection([$file]));
in the threads example. Is this the current way to add attachments?
@helgatheviking Yes, that's the way to add an attachment to a thread 👍
Just make sure you replace the __FILE__
magic constant with the path of the file you want to upload.
I found this issue concerning adding attachments to a conversation: https://github.com/helpscout/helpscout-api-php/issues/47#issuecomment-289723552
But it's a little confusing to me because I can't tell what
$hs->createAttachment($at);
is meant to be, nor can I findcreateAttachment()
in the source any more.