How to perform Update operations in GridFS (using Java)?
问题 I am using Mongo-Java-Driver 2.13 I stored a PDF file ( size 30mb ) in GridFS . I am able to perform insertion, deletion and find operation easily. MongoClient mongo = new MongoClient("localhost", 27017); DB db = mongo.getDB("testDB"); File pdfFile = new File("/home/dev/abc.pdf"); GridFS gfs = new GridFS(db,"books"); GridFSInputFile inputFile = gfs.createFile(pdfFile); inputFile.setId("101"); inputFile.put("title", "abc"); inputFile.put("author", "xyz"); inputFile.save(); data is persisted in