[CSHARP-436] GridFS: UploadDate is not set when a file is stored. Created: 09/Apr/12 Updated: 02/Apr/15 Resolved: 16/Apr/12 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.4 |
| Fix Version/s: | 1.4.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Thomas Hulka | Assignee: | Craig Wilson |
| Resolution: | Done | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows |
||
| Description |
|
private void OpenCreate() in MongoGridFSStream.cs should set the UploadDate of the _fileInfo field. |
| Comments |
| Comment by Thomas Hulka [ 16/Apr/12 ] |
|
Craig, that makes sense. As you say, the workaround is no big deal. Thank you for caring. |
| Comment by Craig Wilson [ 16/Apr/12 ] |
|
Thomas, Since you seem to a very reasonable workaround, we'd like to consider this the official way of handling your scenario. This would be a potentially breaking change for us to do this automatically and we have others using the update feature that may not expect the date to change. Thanks for reporting the issue. You can reopen the issue if you feel strongly about this happening in a future release. |
| Comment by Thomas Hulka [ 09/Apr/12 ] |
|
Workaround: set UploadDate when creating the file: var stream = this.db.GridFS.Create(name, new MongoGridFSCreateOptions {UploadDate = DateTime.Now }); |