{"action":"created","issue":{"url":"https://api.github.com/repos/responsiv/uploader-plugin/issues/50","repository_url":"https://api.github.com/repos/responsiv/uploader-plugin","labels_url":"https://api.github.com/repos/responsiv/uploader-plugin/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/responsiv/uploader-plugin/issues/50/comments","events_url":"https://api.github.com/repos/responsiv/uploader-plugin/issues/50/events","html_url":"https://github.com/responsiv/uploader-plugin/issues/50","id":466857954,"node_id":"MDU6SXNzdWU0NjY4NTc5NTQ=","number":50,"title":"Model created several times","user":{"login":"PubliAlex","id":44265145,"node_id":"MDQ6VXNlcjQ0MjY1MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/44265145?v=4","gravatar_id":"","url":"https://api.github.com/users/PubliAlex","html_url":"https://github.com/PubliAlex","followers_url":"https://api.github.com/users/PubliAlex/followers","following_url":"https://api.github.com/users/PubliAlex/following{/other_user}","gists_url":"https://api.github.com/users/PubliAlex/gists{/gist_id}","starred_url":"https://api.github.com/users/PubliAlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PubliAlex/subscriptions","organizations_url":"https://api.github.com/users/PubliAlex/orgs","repos_url":"https://api.github.com/users/PubliAlex/repos","events_url":"https://api.github.com/users/PubliAlex/events{/privacy}","received_events_url":"https://api.github.com/users/PubliAlex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-07-11T12:19:16Z","updated_at":"2019-07-11T13:31:55Z","closed_at":null,"author_association":"NONE","body":"Hi, I have a strange bug with the uploader plugin.\r\n\r\nI have a model : Post with the following file attachment : \r\n\r\n    public $attachMany = [\r\n        'files' => 'System\\Models\\File',\r\n    ];\r\n\r\nI have the following code in my html : \r\n\r\n    {{ form_open({ request: 'onSave' }) }}\r\n      <input type=\"text\" name=\"title\" />\r\n      {% component 'fileUploader' %}\r\n      <button type=\"submit\">Submit</button>\r\n    {{ form_close() }}\r\n\r\nAnd here is my onSave function : \r\n\r\n    function onSave() {\r\n        $post = new Post;\r\n        $post->name = post('title');\r\n        $post->save(null, post('_session_key'));\r\n    }\r\n\r\nMy problem is that, each time I upload a file, a new model is created. Don't know what to do to prevent that and attach all my files to only one model.\r\n\r\nAny help would be greatly appreciated, thanks !"},"comment":{"url":"https://api.github.com/repos/responsiv/uploader-plugin/issues/comments/510486606","html_url":"https://github.com/responsiv/uploader-plugin/issues/50#issuecomment-510486606","issue_url":"https://api.github.com/repos/responsiv/uploader-plugin/issues/50","id":510486606,"node_id":"MDEyOklzc3VlQ29tbWVudDUxMDQ4NjYwNg==","user":{"login":"LukeTowers","id":7253840,"node_id":"MDQ6VXNlcjcyNTM4NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/7253840?v=4","gravatar_id":"","url":"https://api.github.com/users/LukeTowers","html_url":"https://github.com/LukeTowers","followers_url":"https://api.github.com/users/LukeTowers/followers","following_url":"https://api.github.com/users/LukeTowers/following{/other_user}","gists_url":"https://api.github.com/users/LukeTowers/gists{/gist_id}","starred_url":"https://api.github.com/users/LukeTowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukeTowers/subscriptions","organizations_url":"https://api.github.com/users/LukeTowers/orgs","repos_url":"https://api.github.com/users/LukeTowers/repos","events_url":"https://api.github.com/users/LukeTowers/events{/privacy}","received_events_url":"https://api.github.com/users/LukeTowers/received_events","type":"User","site_admin":false},"created_at":"2019-07-11T13:31:55Z","updated_at":"2019-07-11T13:31:55Z","author_association":"NONE","body":"@PubliAlex this plugin isn't actually supported, it's more of a reference for how you could implement things. If you find the solution feel free to make a PR and I'll review that but I don't have time to look into it myself for free."}}
{"actor":{"display_login":"LukeTowers"}}