Skip to content

Is there way to send files (not images) without extending the driver?  #119

@kirchevsky

Description

@kirchevsky

Can I send CSV, XLS, PDF, or other files without rewriting the driver to get this feature?

$filePath = $this->createRatesCsv($rates);
$fileAttachment = new File($filePath, [
                'custom_payload' => false,
]);
$message = OutgoingMessage::create('Rate Data')->withAttachment($fileAttachment);
$this->bot->reply($message);

The construction like that doesn't work with both (URL or path) cases.

Someone may have had the proper piece of code not to dance with that thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions