--- /dev/null
+<script type="text/javascript">
+ // File picker plugin
+ // Author: https://github.com/pepijndevos/
+
+ $script("//api.filepicker.io/v1/filepicker.js", function () {
+ var network = kiwi.components.Network();
+ var control = kiwi.components.ControlInput();
+
+ filepicker.setKey("YOUR_API_KEY");
+
+ function uploaded(files) {
+ var area = $("#kiwi #controlbox textarea");
+
+ for (var i = 0; files.length>i; i++) {
+ area.val(area.val() + " " + files[i].url);
+ }
+ }
+
+ filepicker.makeDropPane($("#kiwi #panels")[0], { onSuccess: uploaded });
+
+ var $icon = $("<a class=\"upload\" title=\"Send File\"><i class=\"icon-upload-alt\"></i></a>");
+ $icon.click(function () { filepicker.pickMultiple(uploaded); });
+
+ control.addPluginIcon($icon);
+ });
+</script>
\ No newline at end of file