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 public function handle() : ?Document
{ {
if(!$this->file) if(is_array($this->file)) //return early if the payload is just JSON
return null; return null;
$path = self::PROPERTIES[$this->type]['path']; $path = self::PROPERTIES[$this->type]['path'];