[英]Get File from Google cloud storage bucket using RestSharp or C#
i am trying to download file from . 我正在尝试从下载文件。 For downloading i am using rest Sharp API but not succeeded, before it have tried following line of code but still not succeed 对于下载,我尝试使用其余的Sharp API,但未成功,但尝试以下代码行但仍未成功
Dim dwn As ObjectsResource.GetRequest = New ObjectsResource.GetRequest(storageService, "dfa_-xxxxxx", "kkkk_07-xx-20xx.log.gz")
Dim stm As FileStream = New FileStream(Server.MapPath("DFA/kkkk_07-xx-20xx.log.gz"), FileMode.Create, FileAccess.Write)
dwn.Download(stmRead)//Not working
Please suggest what should i do . 请提出我该怎么办。
I got a C# Project "SharpGS".It works fine and Crate & delete buckets,download objects. 我有一个C#项目“ SharpGS”。它可以正常工作,并创建并删除存储桶,下载对象。
http://oleksiy.pro/2010/06/17/google-storage-api-with-c-sharpgs-try-it/ http://oleksiy.pro/2010/06/17/google-storage-api-with-c-sharpgs-try-it/
Here are two keys to be use . 这是两个要使用的键。 Login your Google API console and then click "Here" link in given article's point 2 . 登录您的Google API控制台,然后在给定文章的要点2中单击“此处”链接。 It will redirect to you Google Cloud Storage tab ,see in footer and activate interoperable Storage Access and active it . 它将重定向到您的Google Cloud Storage选项卡,请参见脚注并激活可互操作的Storage Access并将其激活。 Now you can see Access and Secrete Key (term use in project AuthKey /AuthSecret ) 现在您可以看到访问和秘密密钥(在项目AuthKey / AuthSecret中定期使用)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.