{"action":"created","issue":{"url":"https://api.github.com/repos/fex-team/webuploader/issues/1244","labels_url":"https://api.github.com/repos/fex-team/webuploader/issues/1244/labels{/name}","comments_url":"https://api.github.com/repos/fex-team/webuploader/issues/1244/comments","events_url":"https://api.github.com/repos/fex-team/webuploader/issues/1244/events","html_url":"https://github.com/fex-team/webuploader/issues/1244","id":105492571,"number":1244,"title":"如何销毁 webuploader 实例【入门问题】","user":{"login":"freedom-diy","id":8792234,"avatar_url":"https://avatars.githubusercontent.com/u/8792234?v=3","gravatar_id":"","url":"https://api.github.com/users/freedom-diy","html_url":"https://github.com/freedom-diy","followers_url":"https://api.github.com/users/freedom-diy/followers","following_url":"https://api.github.com/users/freedom-diy/following{/other_user}","gists_url":"https://api.github.com/users/freedom-diy/gists{/gist_id}","starred_url":"https://api.github.com/users/freedom-diy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedom-diy/subscriptions","organizations_url":"https://api.github.com/users/freedom-diy/orgs","repos_url":"https://api.github.com/users/freedom-diy/repos","events_url":"https://api.github.com/users/freedom-diy/events{/privacy}","received_events_url":"https://api.github.com/users/freedom-diy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-09T00:13:50Z","updated_at":"2015-09-10T14:13:57Z","closed_at":null,"body":"官方文档上写着：destroy\r\ndestroy() ⇒ undefined\r\n销毁 webuploader 实例\r\n\r\n现在是每次上传完之后，不能再次上传；\r\n需要点击再次上传需要销毁一下实例，在进行实例的初始化。\r\n\r\n能不能提供一个销毁的小demo呢？代码段也行呀。\r\nuploader.destroy();\r\nWebUploader.destroy();"},"comment":{"url":"https://api.github.com/repos/fex-team/webuploader/issues/comments/139247531","html_url":"https://github.com/fex-team/webuploader/issues/1244#issuecomment-139247531","issue_url":"https://api.github.com/repos/fex-team/webuploader/issues/1244","id":139247531,"user":{"login":"freedom-diy","id":8792234,"avatar_url":"https://avatars.githubusercontent.com/u/8792234?v=3","gravatar_id":"","url":"https://api.github.com/users/freedom-diy","html_url":"https://github.com/freedom-diy","followers_url":"https://api.github.com/users/freedom-diy/followers","following_url":"https://api.github.com/users/freedom-diy/following{/other_user}","gists_url":"https://api.github.com/users/freedom-diy/gists{/gist_id}","starred_url":"https://api.github.com/users/freedom-diy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freedom-diy/subscriptions","organizations_url":"https://api.github.com/users/freedom-diy/orgs","repos_url":"https://api.github.com/users/freedom-diy/repos","events_url":"https://api.github.com/users/freedom-diy/events{/privacy}","received_events_url":"https://api.github.com/users/freedom-diy/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T14:13:57Z","updated_at":"2015-09-10T14:13:57Z","body":"还真的是可以诶。\r\n```\r\ndestroy = function(){\r\n        if(uploader){\r\n            // uploader.destroy();\r\n            delete window;\r\n            $(\"#uploader\").html('')\r\n                .html('<div class=\"queueList\"><div id=\"dndArea\" class=\"placeholder\"><div id=\"filePicker\"></div><p>或将照片拖到这里，单次最多可选20张</p></div></div><div class=\"statusBar\" style=\"display:none;\"><div class=\"progress\"><span class=\"text\">0%</span><span class=\"percentage\"></span></div><div class=\"info\"></div><div class=\"btns\"><div id=\"filePicker2\"></div><div class=\"uploadBtn\">开始上传</div></div></div>');\r\n        }\r\n    };\r\n\r\n\treturn{\r\n\t\tinit:init,\r\n        destroy:destroy\r\n\t};\r\n```"}}