Skip to content

A self-hosted media server and file management system

chore: delete obsolete service

aminnausinf844abe7d9bc
diff --git a/app/Services/Images/ImageDownloadService.php b/app/Services/Images/ImageDownloadService.php
deleted file mode 100644
index 8de7764d..00000000
--- a/app/Services/Images/ImageDownloadService.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-namespace App\Services\Images;
-
-use App\Jobs\VerifyFiles;
-use Illuminate\Support\Facades\Http;
-use Illuminate\Support\Facades\Log;
-use Illuminate\Support\Facades\Storage;
-
-class ImageDownloadService {
- // TODO: Eventually use this service with DI in verifyFiles and verifyFolders to download thumbnail urls ... currently using static function in verifyFolders
- public function importExternalImageAsURL($url, $compositePath) {
- try {
- $response = Http::get($url);
- if ($response->successful()) {
- dump('Getting thumbnail');
- $imageContent = $response->body();
- $path = 'thumbnails/' . $compositePath . '.webp';
- Storage::disk('public')->put($path, $imageContent);
-
- return VerifyFiles::getPathUrl($path);
- }
- } catch (\Throwable $th) {
- Log::warning('Unable to download thumbnail image from ' . $url . ' : ' . $th->getMessage());
- }
-
- return false;
- }
-}