mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 18:54:58 +00:00 
			
		
		
		
	Better attachment handling.
This commit is contained in:
		| @@ -60,10 +60,14 @@ class AttachmentHelper implements AttachmentHelperInterface | |||||||
|     { |     { | ||||||
|         $files = Input::file('attachments'); |         $files = Input::file('attachments'); | ||||||
|  |  | ||||||
|         foreach ($files as $entry) { |         if (is_array($files)) { | ||||||
|             if (!is_null($entry)) { |             foreach ($files as $entry) { | ||||||
|                 $this->processFile($entry, $model); |                 if (!is_null($entry)) { | ||||||
|  |                     $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