-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Feature request
Ability to specify file_size_limit and allowed_mime_types when creating a bucket. This will help bring the library up to LW7 feature parity.
Describe the solution you'd like
Borrowing from the
$storage = new Storage\StorageClient($url, [
Authorization' => 'Bearer ' . $service_key,
]);
// Create Bucket with file size limit 20mb
$opts = [
'public' => true,
'fileSizeLimit' => '20mb',
'allowedMimeTypes' => ['image/jpeg'],
];
$result = $storage->createBucket('my-new-storage-bucket', $opts);
$bigFile = ... // 1GB
try {
$result = $storage->upload($file_path, $bigFile);
} catch ($e) {
expect($e).toEqual({
error: 'Payload too large',
message: 'The object exceeded the maximum allowed size',
statusCode: '413',
});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request