Changed in version 1.2.
MongoDB\GridFS\Bucket::getChunkSizeBytes()
Returns the chunk size of this bucket in bytes.
function getChunkSizeBytes(): integer
The chunk size of this bucket in bytes.
<?php $bucket = (new MongoDB\Client)->test->getGridFSBucket(); var_dump($bucket->getChunkSizeBytes());
The output would then resemble:
int(261120)
On this page
Documentation
PHP Library Manual
Overview
Getting Started
Connect
Databases & Collections
CRUD Operations
Aggregation
Data Formats
Indexes
Run a Database Command
MongoDB Search
MongoDB Vector Search
Logging and Monitoring
Security
Third-Party Integrations
Reference
Compatibility
API Documentation
BSON
MongoDB\Client
MongoDB\ClientBulkWrite
MongoDB\Database
MongoDB\Collection
MongoDB\GridFS\Bucket
__construct()
delete()
deleteByName()
downloadToStream()
downloadToStreamByName()
drop()
find()
findOne()
getBucketName()
getChunksCollection()
getChunkSizeBytes()
getDatabaseName()
getFileDocumentForStream()
getFileIdForStream()
getFilesCollection()
getReadConcern()
getReadPreference()
getTypeMap()
getWriteConcern()
openDownloadStream()
openDownloadStreamByName()
openUploadStream()
registerGlobalStreamWrapperAlias()
rename()
renameByName()
uploadFromStream()
Result Classes
Functions
Exception Classes
Issues & Help