mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 05:03:13 +00:00
fix local references in upload/export disk. first step for #1727.
This commit is contained in:
@@ -34,7 +34,7 @@ use FireflyIII\User;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
use Storage;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
/**
|
||||
* Class AttachmentRepository.
|
||||
@@ -66,9 +66,9 @@ class AttachmentRepository implements AttachmentRepositoryInterface
|
||||
/** @var AttachmentHelperInterface $helper */
|
||||
$helper = app(AttachmentHelperInterface::class);
|
||||
|
||||
$file = $helper->getAttachmentLocation($attachment);
|
||||
$path = $helper->getAttachmentLocation($attachment);
|
||||
try {
|
||||
unlink($file);
|
||||
Storage::disk('upload')->delete($path);
|
||||
} catch (Exception $e) {
|
||||
Log::error(sprintf('Could not delete file for attachment %d: %s', $attachment->id, $e->getMessage()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user