如何将 BIM 360 文件的内容作为文件流读取并将其写入另一个流

How to read the content of a BIM 360 file as a filestream and writes it to another stream

我正在查看这份文件 AutoDesk 我能够从 BIM 360 中获取 Files/Folders 结构和内容,但是有没有一种方法可以将文件的内容作为文件流读取以将其写入不同的文件(我不想在本地下载文件)在 .Net 核心中不使用休息端点。

getObject method (from the official Forge SDK) that is typically used to access OSS data (which BIM 360 Docs uses under the hood as well) does return System.IO.Stream already. So you should be able to stream the incoming data anywhere you need. For example, you can redirect the stream to another POST request as explained in this tutorial:

    var request = new HttpRequestMessage(HttpMethod.Post, "/some/endpoint");
    using (var requestContent = new StreamContent(stream))
    {
        request.Content = requestContent;
        using (var response = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead))
        {
            response.EnsureSuccessStatusCode();
            var content = await response.Content.ReadAsStreamAsync();
        }    
    }