<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:37: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>[GODRIVER-2058] Allow setting uploadDate on gridfs upload file</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2058</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;You should be able to set the `uploadDate` field when opening a gridfs upload stream. Right now it always uses `time.Now()`. I believe you&apos;d want to add this as a method like `options.GridFSUpload().SetUploadDate()`.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The old mgo driver use to allow this iirc and either way it is useful for controlling more aspects of gridfs files instead of having to stick it in metadata.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1795371">GODRIVER-2058</key>
            <summary>Allow setting uploadDate on gridfs upload file</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="benji.rewis@mongodb.com">Benji Rewis</assignee>
                                    <reporter username="epelc@greatcloak.com">Ed Pelc</reporter>
                        <labels>
                            <label>feature</label>
                            <label>mgocompat</label>
                            <label>post-5.0</label>
                    </labels>
                <created>Wed, 23 Jun 2021 15:15:01 +0000</created>
                <updated>Tue, 10 Aug 2021 20:48:16 +0000</updated>
                            <resolved>Tue, 10 Aug 2021 20:48:16 +0000</resolved>
                                                                    <component>GridFS</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3993477" author="benji.rewis" created="Tue, 10 Aug 2021 20:48:16 +0000"  >&lt;p&gt;Elaborated in the &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/master/mongo/gridfs/download_stream.go#L61-L62&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;documentation&lt;/a&gt; for UploadDate. Thanks again for your report &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=epelc%40greatcloak.com&quot; class=&quot;user-hover&quot; rel=&quot;epelc@greatcloak.com&quot;&gt;epelc@greatcloak.com&lt;/a&gt;! The associated DOCSP ticket is listed as &quot;Open&quot;.&lt;/p&gt;</comment>
                            <comment id="3993472" author="xgen-internal-githook" created="Tue, 10 Aug 2021 20:45:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Benjamin Rewis&apos;, &apos;email&apos;: &apos;32186188+benjirewis@users.noreply.github.com&apos;, &apos;username&apos;: &apos;benjirewis&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2058&quot; title=&quot;Allow setting uploadDate on gridfs upload file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2058&quot;&gt;&lt;del&gt;GODRIVER-2058&lt;/del&gt;&lt;/a&gt; Document that File UploadDate is not configurable (#711)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/ccd27717f6ed6ba4f77b3213df84c1f7bc3eb630&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/ccd27717f6ed6ba4f77b3213df84c1f7bc3eb630&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3973160" author="benji.rewis" created="Fri, 30 Jul 2021 16:29:23 +0000"  >&lt;p&gt;Hello again &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=epelc%40greatcloak.com&quot; class=&quot;user-hover&quot; rel=&quot;epelc@greatcloak.com&quot;&gt;epelc@greatcloak.com&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;That sounds like a plan. Here&apos;s an addition to our current documentation in the Go driver: &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/711.&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/711.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;ve filed an internal documentation ticket to request that &lt;a href=&quot;https://docs.mongodb.com/manual/core/gridfs/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/core/gridfs/&lt;/a&gt;&#160;be updated, but because the documentation project is internal you might not be able to see it in the &lt;tt&gt;Issue Links&lt;/tt&gt; off of this ticket. I&apos;ll talk to the docs team about updating the security level and make sure to keep you abreast of any possible changes to the official documentation.&lt;/p&gt;</comment>
                            <comment id="3969712" author="epelc@greatcloak.com" created="Thu, 29 Jul 2021 03:57:19 +0000"  >&lt;p&gt;Hi Benji,&lt;/p&gt;

&lt;p&gt;Thanks for working on this. I think it&apos;s ok to keep it readonly but I&apos;d strongly request it be documented in the go driver and also on the official gridfs docs. Basically something saying the drivers manage this field and it is explicitly meant to be read only/set by the driver at file upload time(also recommend using the metadata field to store your own date).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.mongodb.com/manual/core/gridfs/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/core/gridfs/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think if the drivers are going to take that stance it should be written down prominently to help avoid people potentially going down a rabbit hole.&lt;/p&gt;</comment>
                            <comment id="3968915" author="benji.rewis" created="Wed, 28 Jul 2021 18:48:17 +0000"  >&lt;p&gt;Hello again &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=epelc%40greatcloak.com&quot; class=&quot;user-hover&quot; rel=&quot;epelc@greatcloak.com&quot;&gt;epelc@greatcloak.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The associated drivers ticket (DRIVERS-1845), which was a feature request to consider making the &lt;tt&gt;uploadDate&lt;/tt&gt; field configurable as a cross-drivers change, has been closed. In short, they&apos;ve suggested that users in your position make use of the &lt;tt&gt;metadata&lt;/tt&gt; field, described &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst#file-upload&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; in cross-drivers specifications and available &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/master/mongo/options/gridfsoptions.go#L120-L123&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; in the Go driver. The &lt;tt&gt;uploadDate&lt;/tt&gt; would still contain the time the file was uploaded to GridFS, but the &lt;tt&gt;metadata&lt;/tt&gt; field could hold the actual upload date from the third-party storage system.&lt;/p&gt;

&lt;p&gt;Let us know if that still introduces a lot of friction to your migration from mgo, and we can certainly brainstorm other workarounds.&lt;/p&gt;</comment>
                            <comment id="3930844" author="benji.rewis" created="Tue, 13 Jul 2021 15:50:01 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=epelc%40greatcloak.com&quot; class=&quot;user-hover&quot; rel=&quot;epelc@greatcloak.com&quot;&gt;epelc@greatcloak.com&lt;/a&gt; !&lt;/p&gt;

&lt;p&gt;Thanks again for your feature request. Your case sounds totally reasonable, and we&#8217;d like to make your migration from mgo as seamless as possible.&lt;/p&gt;

&lt;p&gt;The GridFS API is defined by a cross-drivers &lt;a href=&quot;https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;specification&lt;/a&gt;, and it currently requires that uploadDate be the current time when a file is uploaded. So, I&#8217;ve created &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-1845&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;DRIVERS-1845&lt;/a&gt; to consider making that field configurable as a cross-drivers change.&lt;/p&gt;</comment>
                            <comment id="3919513" author="epelc@greatcloak.com" created="Wed, 7 Jul 2021 00:42:16 +0000"  >&lt;p&gt;Hi Matt,&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Not using indexes, it&apos;s just a field we show to end users.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;I&apos;d like to support this since our download system allows storing generated files but also files we pull from other systems where a created at/upload date is set by an external system instead of us. Ideally we&apos;d track both but in this case we just need the actual upload date from the third party so it&apos;s simpler to just use the builtin upload date field.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;We use to use the mgo driver and it supported this&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="3919508" author="JIRAUSER1259527" created="Wed, 7 Jul 2021 00:38:29 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=epelc%40greatcloak.com&quot; class=&quot;user-hover&quot; rel=&quot;epelc@greatcloak.com&quot;&gt;epelc@greatcloak.com&lt;/a&gt; thanks for this feature request! I have a few questions to help us better understand your use case for setting an alternate &lt;tt&gt;uploadDate&lt;/tt&gt; value.&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Are you using the indexes created for &lt;tt&gt;uploadDate&lt;/tt&gt; to find or order GridFS files?&lt;/li&gt;
	&lt;li&gt;Are there any additional behaviors that setting &lt;tt&gt;uploadDate&lt;/tt&gt; supports but adding a date to the GridFS file metadata doesn&apos;t support?&lt;/li&gt;
	&lt;li&gt;Are you currently or did you recently migrate from &lt;tt&gt;mgo&lt;/tt&gt; to the &lt;tt&gt;mongo-go-driver&lt;/tt&gt;?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Unfortunately, we won&apos;t be able to pick up any feature requests until the MongoDB Server v5.0 release on July 13th. Thanks for your patience!&lt;/p&gt;</comment>
                            <comment id="3894173" author="epelc@greatcloak.com" created="Wed, 23 Jun 2021 15:16:22 +0000"  >&lt;p&gt;This would be where it&apos;d be used internally.&lt;/p&gt;

&lt;p&gt;`createFilesCollDoc`&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/anser/blob/main/vendor/go.mongodb.org/mongo-driver/mongo/gridfs/upload_stream.go#L212&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/anser/blob/main/vendor/go.mongodb.org/mongo-driver/mongo/gridfs/upload_stream.go#L212&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10620">
                    <name>Issue split</name>
                                                                <inwardlinks description="split from">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </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|hz8qwf:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>