有没有办法在Google Drive服务帐户中收到更改通知(比如新文件上传)?

huangapple go评论74阅读模式
英文:

Is there a way to be notified of changes (like new file uploaded) in a Google Drive service account?

问题

我正在使用C# Google Drive API上传和下载一些文件。我的凭证是服务帐号类型的。我正在从一个独立的Docker容器上传文件到Drive。我的C#应用程序(.NET Framework)需要在此发生时得知,而不需要不断地检查Drive文件夹。我如何在没有暴露终端点或URI的情况下实现这一点?同时,是否绝对必要拥有带有IP地址/专用域名的URI?

英文:

I am using C# Google Drive API to upload and download some files. My credential is of a Service Account type. I am uploading files to the Drive from a separate Docker container. My C# application(.NET Framework) needs to know when this happens without constantly checking the Drive folder. How can I do this without having an exposed Endpoint or URI ? Also is having a URI with IP address/dedicated domain name absolutely necessary?

答案1

得分: 1

你可以尝试为您的资源创建监视请求,这样您的C#应用程序就不需要不时地检查您的驱动器。您可以参考此参考链接中的指南,根据与资源关联的监视方法来创建监视请求。

英文:

You can try creating a watch requests for your resources so that your c# application won't need to check your drive from time to time. You can check this reference guide to create watch requests depending on the associated watch method for the resource.<br>

huangapple
  • 本文由 发表于 2023年6月22日 19:22:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76531366.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定