cloudinary-community / cloudinary-laravel

Laravel SDK for Cloudinary
MIT License
255 stars 71 forks source link

Update Validation of MediaAlly.php Trait #75

Open cw-alihyder opened 1 year ago

cw-alihyder commented 1 year ago

It was giving an error on $request->file I just make it to validate whether the given parameter is actually an instance of the upload file or not.

unicodeveloper commented 1 year ago

@cw-alihyder What error was it giving?

cw-alihyder commented 1 year ago

it's not letting the user go to next keep throwing the Exception even if it's a file Instance.

unicodeveloper commented 1 year ago

So how does your PR fix it? @cw-alihyder

cw-alihyder commented 1 year ago

now my PR fixes this by validating whether the param is actually an instance of UploadedFile or not. If it will not instance of UploadedFile it will throw an exception. On the other hand, file_exist doesn't work with the UploadFile instance.