mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Better attachment handling.
This commit is contained in:
@@ -60,10 +60,14 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
{
|
||||
$files = Input::file('attachments');
|
||||
|
||||
foreach ($files as $entry) {
|
||||
if (!is_null($entry)) {
|
||||
$this->processFile($entry, $model);
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $entry) {
|
||||
if (!is_null($entry)) {
|
||||
$this->processFile($entry, $model);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->processFile($files, $model);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@@ -119,6 +119,8 @@ class AttachmentController extends Controller
|
||||
|
||||
/**
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function preview(Attachment $attachment)
|
||||
{
|
||||
|
Reference in New Issue
Block a user