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