mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
fix local references in upload/export disk. first step for #1727.
This commit is contained in:
@@ -30,7 +30,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Log;
|
||||
use Storage;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
|
||||
/**
|
||||
@@ -94,7 +94,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the file location for an attachment,
|
||||
* Returns the file path relative to upload disk for an attachment,
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
@@ -102,8 +102,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
*/
|
||||
public function getAttachmentLocation(Attachment $attachment): string
|
||||
{
|
||||
$path = sprintf('%s%sat-%d.data', storage_path('upload'), DIRECTORY_SEPARATOR, (int)$attachment->id);
|
||||
|
||||
$path = sprintf('%sat-%d.data', DIRECTORY_SEPARATOR, (int)$attachment->id);
|
||||
return $path;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user