简体   繁体   English

暂时在Web服务上保存文件的位置

[英]Where to save file on web service temporarily

I am uploading a file to azure web service, then DO SOMETHING with that file, then erase it. 我正在将文件上传到Azure Web服务,然后对该文件进行某些处理,然后将其擦除。

The service successfully receives the data I am sending I just can't seem to write to any location to save the file in the service. 该服务成功接收了我发送的数据,但似乎无法写入任何位置以将文件保存在服务中。

Any ideas on where I can store temporarily? 关于我可以在哪里临时存储的任何想法? (it works locally) (在本地工作)

This is what I have tried 这就是我尝试过的

string temp2 = System.Web.HttpContext.Current.Request.MapPath(".");
string temp = System.Web.HttpContext.Current.Server.MapPath(".");
FileStream fileToupload = new FileStream(temp2 + "/tempLocation/streamtest.csv", FileMode.Create);

Maybe use Path.GetTempPath() ? 也许使用Path.GetTempPath()

Another way - use Azure Blob Storage 另一种方法-使用Azure Blob存储

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

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