<NME> uploadImgurTest.js
<BEF> ADDFILE
<MSG> Add support for Imgur upload

Enable through settings panel.

Trigger upload via context menu action or notification button.

<DFF> @@ -0,0 +1,24 @@
+const Mainloop = imports.mainloop;
+const Gio = imports.gi.Gio;
+
+const uploadImgur = imports.uploadImgur;
+const {dump} = imports.dump;
+
+const testUploadIcon = () => {
+  let filePath = "data/icon-extensions.gnome.org.png";
+  let file = Gio.File.new_for_path(filePath);
+  let upload = new uploadImgur.Upload(file);
+  upload.connect("progress", (obj, n, total) => {
+    log("n=" + n + " total=" + total + " " + (n/total));
+  });
+  upload.connect("done", (obj, data) => {
+    log("done");
+    log(dump(data));
+    upload.disconnectAll();
+  });
+  log("start()");
+  upload.start();
+};
+
+testUploadIcon();
+Mainloop.run("main");

Add support for Imgur upload