' UNTIL HERE, basically upload code that works already.
If FileId = "" Then
' Upload as new without file id in the URL
Upload.PostBytes(DriveUploadLink & "?uploadType=multipart", data)
Upload.GetRequest.SetContentType("multipart/related; boundary=" & boundary)
Upload.GetRequest.SetHeader("Authorization", "Bearer " & AccessToken)
Else
' FILE UPDATE DOES NOT WORK
'
' HELP, I NEED SOMEBODY.
' HELP :-)
'
Msgbox(FileId, "File ID")
' Update requires a file id
Upload.PostBytes(DriveUploadLink & "/" & FileId & "?uploadType=multipart", data)
Upload.GetRequest.SetContentType("multipart/related; boundary=" & boundary)
Upload.GetRequest.SetHeader("Authorization", "Bearer " & AccessToken)
' For this I always get a 404 NOT FOUND error
' It is the same when I do not use the full metadata from the upload but only the title
' I have veryfied the FileID with the Google API explorer. There it works and I can udpate the title
' or do whatever I want to do (e.g. delete the file)
End If