mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Basic attachment download function.
This commit is contained in:
@@ -20,7 +20,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
|
||||
// move to config:
|
||||
protected $maxUploadSize = 1048576; // 1MB per file
|
||||
protected $allowedMimes = ['image/png','image/jpeg','application/pdf'];
|
||||
protected $allowedMimes = ['image/png', 'image/jpeg', 'application/pdf'];
|
||||
|
||||
public $errors;
|
||||
public $messages;
|
||||
@@ -34,6 +34,18 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
$this->messages = new MessageBag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getAttachmentLocation(Attachment $attachment)
|
||||
{
|
||||
$path = storage_path('upload') . DIRECTORY_SEPARATOR . 'at-' . $attachment->id . '.data';
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
*
|
||||
|
Reference in New Issue
Block a user