Allow xml files to be uploads

This commit is contained in:
David Bomba 2023-08-15 22:50:47 +10:00
parent d2fbf34beb
commit eec0920d1d
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,9 @@ class UploadInvoiceRequest extends Request
*/ */
public function authorize() : bool public function authorize() : bool
{ {
return auth()->user()->can('edit', $this->invoice); /** @var \App\Models\User $user */
$user = auth()->user();
return $user->can('edit', $this->invoice);
} }
public function rules() public function rules()

View File

@ -20,7 +20,7 @@ class Request extends FormRequest
use MakesHash; use MakesHash;
use RuntimeFormRequest; use RuntimeFormRequest;
protected $file_validation = 'sometimes|file|mimes:png,ai,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx,webp|max:20000'; protected $file_validation = 'sometimes|file|mimes:png,ai,jpeg,tiff,pdf,gif,psd,txt,doc,xls,ppt,xlsx,docx,pptx,webp,xml|max:20000';
/** /**
* Get the validation rules that apply to the request. * Get the validation rules that apply to the request.
* *