Skip to content

Error when uploading to Google #93

@burghof

Description

@burghof

I'm getting the following error message:
"URL using bad/illegal format or missing URL malformed"

The reason is that uploadURI is empty. I had to change the first letter of "location" to capital to make it work:

@@ -2242,11 +2242,11 @@ afterReauth:
         delete(req);
         return false;
     }
 
 
-    QString uploadURI = req->getReplyHeader(QByteArray("location"));//   header(QNetworkRequest::LocationHeader).toString();
+    QString uploadURI = req->getReplyHeader(QByteArray("Location"));//   header(QNetworkRequest::LocationHeader).toString();
 
     req->replyText.clear();
 
 
     // delete(req->query);
@@ -2518,11 +2518,11 @@ bool MSGoogleDrive::remote_file_update(MSFSObject *object){
         qInfo()<< QStringLiteral("Service error. ") << this->getReplyErrorString(req->readReplyText()) ;
         delete(req);
         return false;
     }
 
-    QString uploadURI = req->getReplyHeader(QByteArray("location"));//   header(QNetworkRequest::LocationHeader).toString();
+    QString uploadURI = req->getReplyHeader(QByteArray("Location"));//   header(QNetworkRequest::LocationHeader).toString();
 
     delete(req);
 
 
     if( file.size() > GOOGLEDRIVE_CHUNK_SIZE){// multi-chunk upload

System:
Host: xiaomi Kernel: 5.4.0-91-generic x86_64 bits: 64
Desktop: Cinnamon 4.4.8 Distro: Linux Mint 19.3 Tricia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions