Search code examples
phplaravellaravel-5tvos

Validate new filetype (*.lsr) in PHP (Laravel 5.1)


I'm creating a site to upload Parallax images (created by Apple's Parallax Previewer), but I'm having problems verifying that the uploaded files is in this format. The format (*.lsr) is a only a couple of days old so there isn't really that much info around about it.

Is there any way I can check if the is of this type? I'm doing this in Laravel 5.1.


Solution

  • Try $request->file('filename')->getExtension() == '.lsr' with a custom validation