use of com.mongodb.client.gridfs.model.GridFSFile in project mongo-java-driver by mongodb.
the class GridFSUploadStreamImpl method close.
@Override
public void close() {
synchronized (closeLock) {
if (closed) {
return;
}
closed = true;
}
writeChunk();
GridFSFile gridFSFile = new GridFSFile(fileId, filename, lengthInBytes, chunkSizeBytes, new Date(), toHex(md5.digest()), metadata);
filesCollection.insertOne(gridFSFile);
buffer = null;
}
Aggregations