CloudCross icon indicating copy to clipboard operation
CloudCross copied to clipboard

Error when uploading to Google

Open burghof opened this issue 3 years ago • 1 comments

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

burghof avatar Dec 28 '21 15:12 burghof

Ok. Thank you. I include it to next build

MasterSoft24 avatar Dec 29 '21 16:12 MasterSoft24