<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:44 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-1484] Support GridFSDownloadStream CopyTo and CopyToAsync methods</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1484</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Given a GridFSBucket implementation when calling the OpenDownloadStreamAsync method a GridFSDownloadStream is returned.&lt;/p&gt;

&lt;p&gt;The stream returned from the API does not allow us to copy it. When using the CopyToAsync method, a NotImplementedException is thrown, and a NotSupportedException is thrown when using the CopyTo and Read methods. ReadAsync seems to be the only method that works correctly.&lt;/p&gt;

&lt;p&gt;I have attached a .NET sample to show the scenario.&lt;/p&gt;</description>
                <environment>C#, .NET 4.5, Visual Studio 2015, Windows 10</environment>
        <key id="240538">CSHARP-1484</key>
            <summary>Support GridFSDownloadStream CopyTo and CopyToAsync methods</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="Blundell89">Lee Blundell</reporter>
                        <labels>
                    </labels>
                <created>Fri, 20 Nov 2015 22:10:36 +0000</created>
                <updated>Thu, 19 Apr 2018 18:55:01 +0000</updated>
                            <resolved>Wed, 2 Dec 2015 17:05:31 +0000</resolved>
                                    <version>2.1.1</version>
                                    <fixVersion>2.2</fixVersion>
                                    <component>GridFS</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1103259" author="xgen-internal-githook" created="Wed, 2 Dec 2015 16:00:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rstam&apos;, u&apos;name&apos;: u&apos;rstam&apos;, u&apos;email&apos;: u&apos;robert@robertstam.org&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1484&quot; title=&quot;Support GridFSDownloadStream CopyTo and CopyToAsync methods&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1484&quot;&gt;&lt;del&gt;CSHARP-1484&lt;/del&gt;&lt;/a&gt;: Support GridFSDownloadStream CopyToAsync method.&lt;br/&gt;
Branch: v2.1.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/03513d67019b5eea62f6737b6872a80cf103257b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/03513d67019b5eea62f6737b6872a80cf103257b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1101383" author="rstam" created="Mon, 30 Nov 2015 22:55:59 +0000"  >&lt;p&gt;In 2.1.2 we will support CopyToAsync but not CopyTo since 2.1.x is still async-only.&lt;/p&gt;</comment>
                            <comment id="1100927" author="xgen-internal-githook" created="Mon, 30 Nov 2015 17:48:29 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rstam&apos;, u&apos;name&apos;: u&apos;rstam&apos;, u&apos;email&apos;: u&apos;robert@robertstam.org&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1484&quot; title=&quot;Support GridFSDownloadStream CopyTo and CopyToAsync methods&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1484&quot;&gt;&lt;del&gt;CSHARP-1484&lt;/del&gt;&lt;/a&gt;: Support GridFSDownloadStream CopyTo and CopyToAsync methods.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/c44f347d4433e13f0d6ea494131a9016b8b8fa65&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/c44f347d4433e13f0d6ea494131a9016b8b8fa65&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1095148" author="rstam" created="Sun, 22 Nov 2015 02:24:26 +0000"  >&lt;p&gt;It looks like the base Stream class already implements CopyTo and CopyToAsync so probably all we need to do is not override them and let the base class handle them.&lt;/p&gt;

&lt;p&gt;Although we might get better performance overriding them in order to read and write the data in some multiple of the GridFS chunk size.&lt;/p&gt;</comment>
                            <comment id="1095147" author="rstam" created="Sun, 22 Nov 2015 02:16:09 +0000"  >&lt;p&gt;The 2.1 version of the .NET driver is an async-only driver, which is why the Read method is not supported in 2.1.&lt;/p&gt;

&lt;p&gt;The 2.2 version of the .NET driver adds sync versions of all the async methods, so starting with the 2.2 version Read will be supported as well.&lt;/p&gt;

&lt;p&gt;However, as you have correctly pointed out, we need to implement the CopyTo and CopyToAsync methods. I have changed the summary to reflect this.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="99336" name="GridFS_ReadAsync_NotImplementedException.zip" size="1958032" author="Blundell89" created="Fri, 20 Nov 2015 22:10:36 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsehdr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="771">C# Sprint 28</customfieldvalue>
    <customfieldvalue id="802">C# Sprint 29</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>