@dp.message()
async def handle_loadinfo_link(message: Message):
text = message.text.strip() # попытался заменить на split(' ')[-1] не получается.
if not text.startswith("https://loads.ati.su/loadinfo/"):
await message.answer("Неверная ссылка, она должна начинаться на https://loads.ati.su/loadinfo")
return
$document->setImageValue('image', array('path' => $uploadFile, 'width' => 120, 'height' => 60, 'ratio' => false));
Меняю на $document->deleteBlock('image', array('path' => $uploadFile, 'width' => 120, 'height' => 60, 'ratio' => false));
$document->setImageValue('podpis', array('path' => $uploadFile, 'width' => 120, 'height' => 60, 'ratio' => false));
$document->setImageValue('image', array('path' => $uploadFile1, 'width' => 140, 'height' => 140, 'ratio' => false));
$document->saveAs($outputFile);
// Имя скачиваемого файла
$downloadFile = $outputFile;
// Контент-тип означающий скачивание
header("Content-Type: application/octet-stream");
// Размер в байтах
header("Accept-Ranges: bytes");
// Размер файла
header("Content-Length: ".filesize($downloadFile));
// Расположение скачиваемого файла
header("Content-Disposition: attachment; filename=".$downloadFile);
// Прочитать файл
readfile($downloadFile);
unlink($uploadFile);
unlink($uploadFile1);
unlink($outputFile);
https://loads.ru", кавычка случайная
отправляют в таком вот формате естественно выдаёт ошибку, так как перед ссылкой текст.
ФИРМА: Магистраль, ООО, Мос
Код в ATI.SU: 15
рейтинг: 5 , р4144
Ссылка на груз:
https://loads.ati.su/loadinfo/3cb2f321-tm_source=atiapp