adaptation pour minio

This commit is contained in:
2022-08-31 11:20:22 +02:00
parent d2fde8a871
commit d539a2a740
23 changed files with 66 additions and 205 deletions

View File

@ -45,7 +45,6 @@ class MinioService
'SaveAs' => $tmpdir.'/'.$filename,
]);
} catch (S3Exception $e) {
dump($e);
switch ($e->getResponse()->getStatusCode()) {
case 404:
throw new NotFoundHttpException($this->translator->trans(self::ERR_FILE_NOT_FOUND, [], 'messages'));
@ -91,7 +90,8 @@ class MinioService
}
if ($deleteSource) {
unlink($file);
$tmpdir=$this->rootPath."/var/tmp";
@unlink($tmpdir."/".$filename);
}
}
@ -112,8 +112,6 @@ class MinioService
]);
} catch (Exception $e) {
\Sentry\captureException($e);
dump($this->minioRoot.$to);
dump($e->getMessage());
throw new Exception(self::ERR_UNAVAILABLE);
}
@ -231,7 +229,6 @@ class MinioService
]);
}
} catch (Exception $e) {
dump($e->getMessage());
throw new Exception(self::ERR_UNAVAILABLE);
}
}