Nima Hamidpour
upload file
i want to upload file but get error
/livewire/upload-file?expires=1719692178&signature=aff321a57666b03dc9c6eb880864e2d94d34e13a65b95fd195503dc4f1ea6de0
i have load balancer ingress,nginx and my app
in my
class TrustProxies extends Middleware
{
/
* The trusted proxies for this application.
*
* @var array<int, string>|string|null
/
protected $proxies = '';
/
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}
and in AppServiceProvider
URL::forceScheme('https');
request()->headers->set('X-Forwarded-Proto', 'https');
and its my nginx.conf
server {
listen 80;
client_max_body_size 100M;
index index.php index.html;
root /var/www/html/public;
error_log stderr warn;
#access_log /dev/stdout main;
#add_header X-Forwarded-Proto https;
#add_header X-Forwarded-Scheme https;
location / {
try_files $uri $uri/ /index.php?$query_string;
gzip_static on;
}
location ~ .php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ^~ /livewire {
try_files $uri $uri/ /index.php?$query_string;
}
}
but not work
4 replies
get error when upload file for import excel
i want to import excel in filament but not csv extention and xlsx,ImporterAction filament just get csv and can not import xlsx
so im using maatwebsite package but when use form in filament like this code
Tables\Actions\Action::make('test')->form([
FileUpload::make('test')
])->action(function ($data){
Excel::import(new MoadianImport,$data['test']);
})
get error
Could not find zip member zip:///var/www/html/storage/framework/cache/laravel-excel/laravel-excel-bdpt3IAx5mAIgTXDE3B4a4MJbc447cKD.xlsx#_rels.rels
but when use custom view in filament like this
<x-filament::input.wrapper>
<x-filament::input.select wire:model="productId" label="sad">
@foreach(\App\Enums\Moadian\MoadianRequestTypeEnum::cases() as $step)
<option>{{$step->name}}</option>
@endforeach
</x-filament::input.select>
</x-filament::input.wrapper>
<x-filament::input.wrapper class="mt-3">
<x-filament::input
type="file"
wire:model="file"
/>
</x-filament::input.wrapper>
<x-filament::button
type="submit"
color="warning"
class="w-full mt-3">
تایید اطلاعات
</x-filament::button>
i can upload excel
why can not import excel with header action form
8 replies
disappear searchable text input when resulut not found
when use searchable in table column and type any thing thats incorrect and any result not found searchable text input disappear but i want still show text input and user can remove text type and search again instead of remove search indicator to appear again
5 replies