azure - IoT 中心 - 最大上传文件大小

标签 azure azure-storage iot azure-iot-hub

通过 IoT 中心上传的文件的最大大小是多少?最大消息大小是256KB吗(根据documentation)

最佳答案

如果您使用 File Upload,则您正在上传到 Blob 存储IoT 中心设备 SDK 中的功能。

Current size limit of a block blob is 4.75 TiB.

Sample code:

private static async void SendToBlobAsync()
{
    string fileName = "image.jpg";
    Console.WriteLine("Uploading file: {0}", fileName);
    var watch = System.Diagnostics.Stopwatch.StartNew();

    using (var sourceData = new FileStream(@"image.jpg", FileMode.Open))
    {
        await deviceClient.UploadToBlobAsync(fileName, sourceData);
    }

    watch.Stop();
    Console.WriteLine("Time to upload file: {0}ms\n", watch.ElapsedMilliseconds);
}

deviceClient是您的 IoT 中心客户端(设备)。

关于azure - IoT 中心 - 最大上传文件大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55274906/

相关文章:

rest - 为什么/何时使用 IoT 发布/订阅协议(protocol)而不是 RESTful HTTP?

azure - 如何将应用程序注册绑定(bind)到特定的 Power BI 实例?

asp.net - Azure Web 角色中的网站项目

Azure监控: How to create dashboard that show amount of storage left in a storage account?

azure - 如何使用 Windows Azure SDK 2.0 插入/更新到 Azure 表

c# - Azure 文件存储 : Error 400 (Condition headers are not supported. )

amazon-web-services - AWS freeRtos "failed to provision device certificate error:48"

javascript - Azure Functions bundle 和扩展、函数版本 - javascript 混淆 2.x、5.0.x+?

azure - Microsoft Graph oauth2 错误 AADSTS900144 : the request body must contain the following parameter "grant type"

Contiki 时间戳值为 int