mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-02 13:39:19 -06:00
Better attachment handling.
This commit is contained in:
parent
7ab0508167
commit
92799699bc
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user