[JAVA-243] support duplicate operation in GridFS Created: 24/Dec/10  Updated: 02/Sep/15  Resolved: 02/Sep/15

Status: Closed
Project: Java Driver
Component/s: GridFS
Affects Version/s: 2.5
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Han Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

java driver



 Description   

add a duplicate() method in GridFS to support a duplication of a file.
When we duplicate a file ,we can increase the reference count of the metadata of the file,
and when the reference count decrease to 0, we can delete the file indeed.



 Comments   
Comment by Ross Lawley [ 02/Sep/15 ]

The new GridFS implementation JAVA-1713 follows the new GridFS Spec which does not include a duplicate method.

However, the logic for duplicating a file with the new API makes this trivial eg:

gridFSBucket.uploadFromStream('new File',  
    gridFSBucket.openDownloadStream(originalFileId));

Comment by Eliot Horowitz (Inactive) [ 27/Dec/10 ]

This is less a java driver feature request and more a request to change the gridfs specification.

Reference counts are not a likely addition, but if you would like to discuss I'd recommend bring up on http://groups.google.com/group/mongodb-dev

Comment by Han [ 27/Dec/10 ]

What I mean is, through reference count to make GridFS support file copy functions.

Comment by Eliot Horowitz (Inactive) [ 24/Dec/10 ]

There aren't any reference counts or anything like that.
What are you trying to do?

Generated at Thu Feb 08 08:51:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.