laravellaravel-vapor

Laravel Vapor- Allow unauthenticated user perform an upload


By default Laravel Vapor requires the user be authenticated to perform an upload. I need to allow an unauthenticated perform an upload. How can I do this?

Thanks


Solution

  • I think if you add something like this in your UserPolicy, vapor should work

    public function before($user)
    {
        if (Auth::guest()) {
            return true;
        }
    }