claude
claude
FFilament
Created by claude on 2/24/2025 in #❓┊help
testing a getHeaderAction
class ListVideos extends ListRecords
{
protected function getHeaderActions()
{
return [
Action::make('add videos')
->form([
FileUpload::make('video')
->acceptedFileTypes(['video/mpeg','video/mp4'])
->multiple()
->disk('minio')
])
];
}
}
class ListVideos extends ListRecords
{
protected function getHeaderActions()
{
return [
Action::make('add videos')
->form([
FileUpload::make('video')
->acceptedFileTypes(['video/mpeg','video/mp4'])
->multiple()
->disk('minio')
])
];
}
}
how can I test a file upload with this code I've tried many combinations and it doesn't run properly. I have other more simple tests working.
2 replies
FFilament
Created by claude on 2/23/2025 in #❓┊help
is there a "starter kit" for filament testing
I'm looking at the filament testing docs and wondering is there a package or something will a huge amount of tests / boilerplate already built in? Because looking at these tests I think it would be good to test a huge range of things.
2 replies
FFilament
Created by claude on 2/22/2025 in #❓┊help
401 on file uploads after switching to HTTP for localhost
livewire.js?id=13b7c601:613
POST https://localhost/livewire/upload-file?expires=1740238903&signature=e3236db37645328d0d61db125bc3240c10943eaad32e100332ddbf1b22cbdc52 401 (Unauthorized)
livewire.js?id=13b7c601:613
POST https://localhost/livewire/upload-file?expires=1740238903&signature=e3236db37645328d0d61db125bc3240c10943eaad32e100332ddbf1b22cbdc52 401 (Unauthorized)
working properly before changing to HTTPS it is failing at livewire-tmp upload stage
//config/livewire
'temporary_file_upload' => [
'disk' => 'local',

//config/filesystems
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/private'),
//.env
FILAMENT_FILESYSTEM_DISK=local
FILESYSTEM_DISK=local

->form([
FileUpload::make('video')
->acceptedFileTypes(['video/mpeg','video/mp4'])
->multiple()
->disk('local')
->directory('videos')
->moveFiles()
])
//config/livewire
'temporary_file_upload' => [
'disk' => 'local',

//config/filesystems
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/private'),
//.env
FILAMENT_FILESYSTEM_DISK=local
FILESYSTEM_DISK=local

->form([
FileUpload::make('video')
->acceptedFileTypes(['video/mpeg','video/mp4'])
->multiple()
->disk('local')
->directory('videos')
->moveFiles()
])
10 replies
FFilament
Created by claude on 2/22/2025 in #❓┊help
CORS problem when switching to HTTPS for local dev
Access to script at 'http://localhost/js/filament/tables/components/table.js?v=3.2.140.0' from origin 'https://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to script at 'http://localhost/js/filament/tables/components/table.js?v=3.2.140.0' from origin 'https://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I have changed .env to https://localhost Using Caddy as reverse proxy. I have pushed this build to production and worked perfectly with https and filament. so something with https and localhost
15 replies