@once @push('scripts') @php if (\Illuminate\Support\Facades\Lang::has($localeString = 'forms::components.file_upload.filepond_locale')) { $locale = __($localeString); } else { $locale = strtolower(str_replace('_', '-', app()->getLocale())); if (! str_contains($locale, '-')) { $locale .= '-' . $locale; } } $defaultLocaleData = ($placeholder = $getPlaceholder()) ? "{ labelIdle: '{$placeholder}' }" : '{}'; @endphp @endpush @endonce
{ return await $wire.removeUploadedFile('{{ $getStatePath() }}', fileKey) }, removeUploadedFileButtonPosition: '{{ $getRemoveUploadedFileButtonPosition() }}', reorderUploadedFilesUsing: async (files) => { return await $wire.reorderUploadedFiles('{{ $getStatePath() }}', files) }, shouldAppendFiles: {{ $shouldAppendFiles() ? 'true' : 'false' }}, state: $wire.{{ $applyStateBindingModifiers('entangle(\'' . $getStatePath() . '\')') }}, uploadButtonPosition: '{{ $getUploadButtonPosition() }}', uploadProgressIndicatorPosition: '{{ $getUploadProgressIndicatorPosition() }}', uploadUsing: async (fileKey, file, success, error, progress) => { $wire.upload(`{{ $getStatePath() }}.${fileKey}`, file, () => { success(fileKey) }, error, progress) }, })" wire:ignore {!! ($id = $getId()) ? "id=\"{$id}\"" : null !!} style="min-height: {{ $isAvatar() ? '8em' : ($getPanelLayout() === 'compact' ? '2.625em' : '4.75em') }}" {{ $attributes->merge($getExtraAttributes())->class([ 'filament-forms-file-upload-component', 'w-32 mx-auto' => $isAvatar(), ]) }} {{ $getExtraAlpineAttributeBag() }} >