如何在不使用python手动进行任何操作的情况下将文件上传到Google驱动器?

时间:2019-05-09 11:38:47

标签: python django google-drive-api

                     var result = from nae in nettingAgreement
                     join no in nettingOpinion on nae.EntityId equals no.EntityId into pp
                     from test in pp.DefaultIfEmpty(new NettingOpinion())
                     join np in nettingProduct on test.ProductId equals np.Id into npd
                     from npdSubset in npd.DefaultIfEmpty()
                     group npdSubset by new { nae.EntityId, nae.EntityName, nae.DocType, nae.Jurisdiction } into g
                     select new NettingAgreementEntityDto
                     {
                         Id = g.Key.EntityId,
                         EntityName = g.Key.EntityName,
                         DocType = g.Key.DocType,
                         Jurisdiction = g.Key.Jurisdiction,
                         ProductList =  g.Select(x => new NettingAgreementProductDto
                         {
                             Id = x?.Id ?? 0,
                             Name = x == null ? string.Empty : x.Name
                         }).ToList()
                     };

此代码还可以将文件上传到Google驱动器,但是在执行过程中,它需要进入gmail登录页面。选择正确的邮件并授予允许删除/创建等权限后,它将文件添加到驱动器。 我希望上传文件时无需手动执行任何操作。请帮忙。

0 个答案:

没有答案