简体   繁体   English

来自外部计算机的Azure上传文件

[英]Azure upload file from an external computer

I'm want to upload file to azure blob storage via c# from an external computer which is not part of azure system (simply my own computer). 我想通过c#从不是Azure系统(仅是我自己的计算机)的外部计算机上将文件上传到Azure Blob存储。 I found only Microsoft example for azure cloud services. 我只找到了Microsoft的Azure云服务示例

You can use Visual studion server explorer to load manualy or write code. 您可以使用Visual Studion服务器资源管理器手动加载或编写代码。

CloudBlockBlob blockBlob = blobDirectory.GetBlockBlobReference("blobname");
blockBlob.UploadFromStream(stream); //stream of file

Another way using Azure storage power shell 使用Azure存储电源外壳的另一种方法

Set-AzureStorageBlobContent -Container containerName -File .\filename -Blob blobname

Yeah, you can upload to blob storage from anywhere. 是的,您可以从任何地方上传到Blob存储。 Doesn't have to be part of the azure infrastructure. 不必一定要成为蔚蓝基础设施的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM