無変換で Google Document にファイルをアップロードするためには, ResumableUploader を使います。 file はファイルへのフルパスになります。
ClientLoginAuthenticator^ cla = gcnew ClientLoginAuthenticator(
"App",
ServiceNames::Documents,
email,
password
);
ResumableUploader^ ru = gcnew ResumableUploader();
Document^ entry = gcnew Document();
entry->Title = "タイトル";
entry->MediaSource = gcnew MediaFileSource(file, "application/octet-stream");
Uri^ createUploadUrl = gcnew Uri("https://docs.google.com/feeds/upload/create-session/default/private/full/?convert=false");
AtomLink^ link = gcnew AtomLink(createUploadUrl->AbsoluteUri);
link->Rel = ResumableUploader::CreateMediaRelation;
entry->DocumentEntry->Links->Add(link);
ru->InsertAsync(cla, entry->DocumentEntry, gcnew Object);
コメントを残す