-1

My problem is only donwload. Tomorrow I have 2 problem they are download and upload. But I solve upload problem. I can share upload code this questions answer. But now only problem download P.S =Client application

1 Answers1

0
var authenticator = new ClientLoginAuthenticator("ApplicationName", ServiceNames.Documents, new GDataCredentials("Username", "Password"));
var service = new DocumentsService("ApplicationName");
var entry = new DocumentEntry();
entry.Title.Text = fileName;
entry.MediaSource = new MediaFileSource(filePath, "application/pdf");
var createUploadUrl = new Uri(String.Format(UploadPath, "uploadFileId"));
var link = new AtomLink(createUploadUrl.AbsoluteUri);
link.Rel = ResumableUploader.CreateMediaRelation;
entry.Links.Add(link);
entry.Service = service;
var uploader = new ResumableUploader();
var response = uploader.Insert(authenticator, entry);
return response.ResponseUri.AbsolutePath;

string UploadPath = "https://docs.google.com/feeds/upload/create-session/default/private/full/folder:{0}/contents";