1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Merge pull request #4681 from turbo124/v5-develop

fix for json documents presenting itself as file uploads
This commit is contained in:
David Bomba 2021-01-14 07:54:54 +11:00 committed by GitHub
commit cec496b6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ class UploadFile implements ShouldQueue
*/
public function handle() : ?Document
{
if(!$this->file)
if(is_array($this->file)) //return early if the payload is just JSON
return null;
$path = self::PROPERTIES[$this->type]['path'];