{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/13217","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/13217/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/13217/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/13217/events","html_url":"https://github.com/laravel/framework/issues/13217","id":149538588,"number":13217,"title":"Successful file validation results in empty session data","user":{"login":"pedzed","id":8146593,"avatar_url":"https://avatars.githubusercontent.com/u/8146593?v=3","gravatar_id":"","url":"https://api.github.com/users/pedzed","html_url":"https://github.com/pedzed","followers_url":"https://api.github.com/users/pedzed/followers","following_url":"https://api.github.com/users/pedzed/following{/other_user}","gists_url":"https://api.github.com/users/pedzed/gists{/gist_id}","starred_url":"https://api.github.com/users/pedzed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedzed/subscriptions","organizations_url":"https://api.github.com/users/pedzed/orgs","repos_url":"https://api.github.com/users/pedzed/repos","events_url":"https://api.github.com/users/pedzed/events{/privacy}","received_events_url":"https://api.github.com/users/pedzed/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-04-19T18:07:55Z","updated_at":"2016-06-01T15:43:41Z","closed_at":"2016-05-30T10:31:26Z","body":"I am not sure how to describe the problem. To reproduce, add these files to a fresh Laravel (5.2) installation:\r\n\r\n**app/Http/routes.php**\r\n```php\r\n<?php\r\n\r\nRoute::get('/', [\r\n    'as' => 'home',\r\n    'uses' => 'HomeController@index',\r\n]);\r\n\r\nRoute::post('/', [\r\n    'uses' => 'HomeController@postIndex',\r\n]);\r\n```\r\n\r\n**app/Http/Controller/HomeController.php**\r\n```php\r\n<?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse Illuminate\\Http\\Request;\r\nuse Validator;\r\n\r\nclass HomeController extends Controller\r\n{\r\n    public function index()\r\n    {\r\n        return view('welcome');\r\n    }\r\n    \r\n    public function postIndex(Request $request)\r\n    {\r\n        $validation = Validator::make($request->all(), [\r\n            'input_1' => 'required',\r\n            'file_upload' => 'required',\r\n            'multi_file_upload' => 'required',\r\n            'multi_file_upload.*' => [\r\n                'max:1000000',\r\n                'mimes:zip,x-rar-compressed',\r\n            ],\r\n        ]);\r\n        \r\n        return redirect()\r\n            ->route('home')\r\n            ->withInput($request->all())\r\n            ->withErrors($validation->messages())\r\n        ;\r\n    }\r\n}\r\n```\r\n\r\n**resources/views/welcome.blade.php**\r\n```php\r\n<!DOCTYPE html>\r\n<html>\r\n    <head>\r\n        <title>Laravel</title>\r\n\r\n        <link href=\"https://fonts.googleapis.com/css?family=Roboto:100\" rel=\"stylesheet\" type=\"text/css\">\r\n\r\n        <style>\r\n            html, body {\r\n                height: 100%;\r\n            }\r\n\r\n            body {\r\n                margin: 0;\r\n                padding: 0;\r\n                width: 100%;\r\n                display: table;\r\n                font-weight: 100;\r\n                font-family: 'Roboto';\r\n            }\r\n\r\n            .container {\r\n                text-align: center;\r\n                display: table-cell;\r\n                vertical-align: middle;\r\n            }\r\n\r\n            .content {\r\n                text-align: left;\r\n                display: inline-block;\r\n            }\r\n\r\n            .title {\r\n                font-size: 24px;\r\n            }\r\n            \r\n            label {\r\n                display: block;\r\n                margin-bottom: 12px;\r\n            }\r\n        </style>\r\n    </head>\r\n    <body>\r\n        <div class=\"container\">\r\n            <div class=\"content\">\r\n                <h1 class=\"title\">\r\n                    Laravel upload bug\r\n                </h1>\r\n                \r\n                @foreach($errors->all() as $error)\r\n                    <li>{{ $error }}</li>\r\n                @endforeach\r\n                \r\n                <form method=\"POST\"\r\n                      enctype=\"multipart/form-data\"\r\n                      novalidate\r\n                >\r\n                    {!! csrf_field() !!}\r\n                    \r\n                    <label>\r\n                        Example Input:\r\n                        <input type=\"text\"\r\n                               name=\"input_1\"\r\n                               value=\"{{ old('input_1') }}\"\r\n                               placeholder=\"Lorem ipsum\" \r\n                        />\r\n                    </label>\r\n                    \r\n                    <label>\r\n                        File upload:\r\n                        <input type=\"file\"\r\n                               name=\"file_upload\"\r\n                        />\r\n                    </label>\r\n                    \r\n                    <label>\r\n                        Multi file upload:\r\n                        <input type=\"file\"\r\n                               name=\"multi_file_upload[]\"\r\n                               multiple\r\n                        />\r\n                    </label>\r\n                    \r\n                    <button type=\"submit\">\r\n                        Submit\r\n                    </button>\r\n                </form>\r\n            </div>\r\n        </div>\r\n    </body>\r\n</html>\r\n```\r\n\r\nSorry for the lack of information, I just can't wrap my head about the problem.\r\n\r\n*Tested on Linux.*"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/223034764","html_url":"https://github.com/laravel/framework/issues/13217#issuecomment-223034764","issue_url":"https://api.github.com/repos/laravel/framework/issues/13217","id":223034764,"user":{"login":"pedzed","id":8146593,"avatar_url":"https://avatars.githubusercontent.com/u/8146593?v=3","gravatar_id":"","url":"https://api.github.com/users/pedzed","html_url":"https://github.com/pedzed","followers_url":"https://api.github.com/users/pedzed/followers","following_url":"https://api.github.com/users/pedzed/following{/other_user}","gists_url":"https://api.github.com/users/pedzed/gists{/gist_id}","starred_url":"https://api.github.com/users/pedzed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedzed/subscriptions","organizations_url":"https://api.github.com/users/pedzed/orgs","repos_url":"https://api.github.com/users/pedzed/repos","events_url":"https://api.github.com/users/pedzed/events{/privacy}","received_events_url":"https://api.github.com/users/pedzed/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T15:43:41Z","updated_at":"2016-06-01T15:43:41Z","body":"I updated Laravel to v5.2.35 and the problem still exists. I hope you understand the problem, because I myself found it difficult to understand it.\r\n\r\nThe problem is that the session data gets emptied under certain circumstances. You lose flash sessions, old input, errors, etc."}}
{"actor":{"display_login":"pedzed"}}