private void uploadFilesFromClipboard(List<File> data) {
        if(data != null && data.size() > 0) {
            setImageWorking();
            ArrayList<String> urls = new ArrayList<String>();
            for(File f : data) {
                JSONObject drop = upload(f);
                // cancel all uploads on error
                if(drop == null) {
                    setImageNormal();
                    return;
                }
                String url = getDropUrl(drop);
                System.out.println("Upload complete, URL:\n"+url);
                urls.add(url);
            }
            int n = urls.size();
            String text = urls.remove(0);
            for(String s : urls) { text += " "+s; }
            setClipboard(text);
            String msg;
            if(n == 1) {
                msg = String.format("Item: %s", data.get(0).getName());
            } else {
                msg = String.format("%d Items: %s", n, data.get(0).getName());
                int nchars = msg.length();
                for(int i = 1; i < data.size(); i++) {
                    if(nchars + data.get(i).getName().length() > 140) {
                        msg += ", ...";
                        break;
                    } else {
                        msg += ", "+data.get(i).getName();
                        nchars += data.get(i).getName().length();
                    }
                }
            }
            setImageNormal();
            icon.displayMessage("Upload finished", msg, TrayIcon.MessageType.INFO);
        }
    }