It sounds like you're encountering a 403 Forbidden error when trying to upload files via Filament's FileUpload component to your B2 bucket, even though direct uploads via Tinker work, and local disk uploads from Filament also work. This strongly suggests an issue with permissions or URL generation/accessibility when Filament tries to interact with your B2 bucket, specifically in a web context.
Jul 6, 2025
2
Level 1
B2 Cloud storage
I use b2 cloud storage and ui for php filament.
here is my b2 disk in filesystem
'b2' => [
'driver' => 's3',
'key' => env('B2_KEY_ID'),
'secret' => env('B2_APPLICATION_KEY'),
'region' => env('B2_REGION'),
'bucket' => env('B2_BUCKET_NAME'),
'endpoint' => env('B2_ENDPOINT'),
'use_path_style_endpoint' => true,
'visibility' => 'private',
'throw' => true,
'checksum' => false,
'options' => [
'http' => [
'verify' => false,
'headers' => [
'x-amz-checksum-crc32' => null,
],
],
],
],
```
here is my phpFilament code
```
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Fieldset::make("Profile")
->schema([
FileUpload::make("file_name")
->disk('b2')
->visibility('private')
->directory('images/actors')
->preserveFilenames()
->nullable()
->label(''),
]),
Forms\Components\TextInput::make('name')
->required()
->maxLength(255),
]);
}
it's work when I set FILESYSTEM_DISK=local in .env. But, it's not work when I change default disk as b2 in .env like this FILESYSTEM_DISK=b2. It's show 403. But I test upload with tinker, it's ok and this error happen in my webpage. how to solve this please.
Please or to participate in this conversation.