{"action":"created","issue":{"url":"https://api.github.com/repos/statamic/workshop/issues/20","repository_url":"https://api.github.com/repos/statamic/workshop","labels_url":"https://api.github.com/repos/statamic/workshop/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/statamic/workshop/issues/20/comments","events_url":"https://api.github.com/repos/statamic/workshop/issues/20/events","html_url":"https://github.com/statamic/workshop/issues/20","id":345897596,"node_id":"MDU6SXNzdWUzNDU4OTc1OTY=","number":20,"title":"Uploading Multiple Images to an Asset Field Fails","user":{"login":"bgarrant","id":2436728,"node_id":"MDQ6VXNlcjI0MzY3Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2436728?v=4","gravatar_id":"","url":"https://api.github.com/users/bgarrant","html_url":"https://github.com/bgarrant","followers_url":"https://api.github.com/users/bgarrant/followers","following_url":"https://api.github.com/users/bgarrant/following{/other_user}","gists_url":"https://api.github.com/users/bgarrant/gists{/gist_id}","starred_url":"https://api.github.com/users/bgarrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgarrant/subscriptions","organizations_url":"https://api.github.com/users/bgarrant/orgs","repos_url":"https://api.github.com/users/bgarrant/repos","events_url":"https://api.github.com/users/bgarrant/events{/privacy}","received_events_url":"https://api.github.com/users/bgarrant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-07-30T19:17:36Z","updated_at":"2018-08-21T14:26:18Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nWhen I upload multiple images using the single `<input type=\"file\" name=\"gallery_images[]\" multiple>` to a Asset filed with no max items, the upload works if files are selected. If no files are selected an EDIT form, it fails with an error `Call to a member function getClientOriginalName() on null`\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\nIn a Workshop form, have a field setup for multiple image uploads like: `<input type=\"file\" name=\"gallery_images[]\" multiple>`. If you select images it will work, if no images selected it fails.  The Asset field has no validation on it.\r\n\r\n**Expected behavior**\r\nUpload multiple images to the Asset field array without issues.  When no images are selected, either keep the existing values or upload nothing if null.\r\n\r\n**Screenshots**\r\nIf applicable, add screenshots to help explain your problem.\r\n\r\n**Environment details (please complete the following information):**\r\n Statamic 2.10.3 and Workshop 1.1.1.\r\n\r\n**Additional context**\r\nAdd any other context about the problem here.\r\n"},"comment":{"url":"https://api.github.com/repos/statamic/workshop/issues/comments/414693299","html_url":"https://github.com/statamic/workshop/issues/20#issuecomment-414693299","issue_url":"https://api.github.com/repos/statamic/workshop/issues/20","id":414693299,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDY5MzI5OQ==","user":{"login":"bgarrant","id":2436728,"node_id":"MDQ6VXNlcjI0MzY3Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2436728?v=4","gravatar_id":"","url":"https://api.github.com/users/bgarrant","html_url":"https://github.com/bgarrant","followers_url":"https://api.github.com/users/bgarrant/followers","following_url":"https://api.github.com/users/bgarrant/following{/other_user}","gists_url":"https://api.github.com/users/bgarrant/gists{/gist_id}","starred_url":"https://api.github.com/users/bgarrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgarrant/subscriptions","organizations_url":"https://api.github.com/users/bgarrant/orgs","repos_url":"https://api.github.com/users/bgarrant/repos","events_url":"https://api.github.com/users/bgarrant/events{/privacy}","received_events_url":"https://api.github.com/users/bgarrant/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T14:26:18Z","updated_at":"2018-08-21T14:26:18Z","author_association":"NONE","body":"Just tried this approach and also throws the same error:\r\n```\r\n      <div class=\"grid-x grid-padding-x mt-1\">\r\n        <div class=\"small-12 cell\">\r\n          <div class=\"card\">\r\n            <div class=\"card-section\">\r\n              <label>Replace Gallery Images</label>\r\n              {{ if gallery_images }}\r\n              {{ gallery_images }}\r\n              <input type=\"hidden\" name=\"gallery_images[]\" value=\"{{ value }}\"/>\r\n              {{ /gallery_images }}\r\n              {{ else }}\r\n              <input type=\"hidden\" name=\"gallery_images\" value=\"false\"/>\r\n              {{ /if }}\r\n              <input type=\"file\" name=\"gallery_images[]\" aria-describedby=\"galleryimagesHelpText\" multiple/>\r\n              <p class=\"help-text\" id=\"galleryimagesHelpText\">This will replace all uploaded images with new images</p>\r\n            </div>\r\n          </div>\r\n        </div>\r\n      ​</div>\r\n```"}}
{"actor":{"display_login":"bgarrant"}}