如何在具有Azure功能的Azure Blob中附加文本文件

编程入门 行业动态 更新时间:2024-10-11 15:23:53
本文介绍了如何在具有Azure功能的Azure Blob中附加文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个文本文件,我需要使用计时器Azure函数每天将数据附加到文件中.文本文件是逗号分隔的文件.我已经创建了CloudBlobClient,并且知道如何制定共享访问策略和令牌.我只是不知道如何使用它来上传.我只知道如何从正在使用的教程中获取访问URI.

I've got a text file I need to append data to daily with a timer Azure Function. The text file is a comma separated file. I've created my CloudBlobClient and knew how to make my Shared Access Policy and Token. I just don't know how to use this to upload. I only know how to get an access URI from the tutorial I'm working with.

推荐答案

我有一个文本文件,需要每天使用计时器Azure函数将数据附加到其中.

I've got a text file I need to append data to daily with a timer Azure Function.

您可以尝试使用针对附加操作优化的附加blob.根据您的描述,您知道如何获取 SAS URI ,因此您可以使用SAS URI创建对附加Blob的引用,并将文件附加到附加Blob,以下代码供您参考.

You can try to use append blob that is optimized for append operations. According to your description, you know how to get SAS URI, so you can use SAS URI to create a reference to an append blob, and append a file to an append blob, the following code is for your reference.

CloudAppendBlob appendBlob = new CloudAppendBlob(new Uri("{storage_account}.blob.core.windows/{your_container}/append-blob.log?st=2017-09-25T02%3A10%3A00Z&se=2017-09-27T02%3A10%3A00Z&sp=rwl&sv=2015-04-05&sr=b&sig=d0MENO44GjtBLf7L8U%2B%2F2nGwPAayjiVSSHaKJgEkmIs%3D")); appendBlob.AppendFromFile("{filepath}\source.txt");

更多推荐

如何在具有Azure功能的Azure Blob中附加文本文件

本文发布于:2023-11-28 07:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641554.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本文件   功能   如何在   Azure   Blob

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!