void RGhostUploader::upload(const ImageType img, const QString fn) {
    image = img.toImage();
    //qDebug() << fn;
    filename = QString(fn);

/*
    if (!image) {
        qDebug() << "RGhost uploader::" << "Failed to convert pixmap to image."; // wat?
        return;
    }*/

    qDebug() << "RGhost uploader::" << "uploading..."; //<< img;
    if (json.isUndefined())
        handshake();
    else
        doUpload();
}