add FTP Upload

This commit is contained in:
Marko
2023-09-26 17:11:51 +02:00
parent 30b675e999
commit a05da31f8f
4 changed files with 939 additions and 549 deletions

View File

@@ -87,7 +87,14 @@ class Jtl
{
try {
$writer = Writer::createFromPath(getcwd().'/jtl/cds-export.csv', 'w+');
$writer->insertAll(new \ArrayIterator($data));
$bytes = $writer->insertAll(new \ArrayIterator($data));
if($bytes){
$this->logger->info('Exported '.$bytes.' bytes');
$FTP = new Ftp();
$FTP->uploadFile(getcwd().'/jtl/cds-export.csv');
}
}catch (\Exception $e){
$this->logger->error($e->getMessage());
@@ -95,4 +102,6 @@ class Jtl
}
}