Skip to content

Commit 776f044

Browse files
committed
Update TelegramPublishJob.php
1 parent 1f0d4e2 commit 776f044

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/Domains/Social/Jobs/Publish/TelegramPublishJob.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Illuminate\Queue\InteractsWithQueue;
1414
use Illuminate\Queue\SerializesModels;
1515
use Illuminate\Support\Facades\Http;
16+
use Storage;
1617

1718
/**
1819
* Class TelegramPublishJob.
@@ -126,10 +127,11 @@ public function handle()
126127
default => 'application/octet-stream'
127128
};
128129

130+
$path = str_replace(appUrl() . '/storage', 'public', $this->cards->getPicture());
129131
$response = Http::attach(
130132
'photo',
131-
$this->cards->getPicture(),
132-
basename($this->cards->getPicture()),
133+
Storage::get($path),
134+
basename($path),
133135
['Content-Type' => $contentType]
134136
)->post($url, [
135137
'chat_id' => $this->platform->config['chat_id'],

0 commit comments

Comments
 (0)