Comments (5)
Hi @awcodes I'm not sure if this one is totally fixed? I Was still able to select previously uploaded files when using the acceptedFilesTypes
argument on my CuratorPicker
field.
I was taking a look through the code for the curator panel component and saw that the getFiles
method actually uses a property called types
to check for file types. So I went ahead and created an override of vendor/awcodes/filament-curator/resources/views/components/actions/picker-action.blade.php
locally and passed through the acceptedFilesTypes
but passed them through to the types
property. This seems to work as expected. However I didnt know if there was a specific reason you'd done it in the way you have. My picker-action.blade.php
looks like this
<livewire:curator-panel
:accepted-file-types="$acceptedFileTypes"
:types="$acceptedFileTypes" // copy of the acceptedFileTypes
:disk-name="$diskName"
:directory="$directory"
:image-crop-aspect-ratio="$imageCropAspectRatio"
:image-resize-mode="$imageResizeMode"
:image-resize-target-width="$imageResizeTargetWidth"
:image-resize-target-height="$imageResizeTargetHeight"
:is-limited-to-directory="$isLimitedToDirectory"
:is-multiple="$isMultiple"
:max-items="$maxItems"
:max-width="$maxWidth"
:min-size="$minSize"
:max-size="$maxSize"
:modal-id="$modalId"
:path-generator="$pathGenerator"
:rules="$rules"
:selected="$selected ?? []"
:should-preserve-filenames="$shouldPreserveFilenames"
:state-path="$statePath"
:visibility="$visibility"
/>
from filament-curator.
Are you on v2 or v3 of the plug-in? It does work on v2. Unless I'm misunderstanding what issue you're having.
from filament-curator.
Are you on v2 or v3 of the plug-in? It does work on v2. Unless I'm misunderstanding what issue you're having.
I'm using awcodes/filament-curator:3.0.0
and filament/filament:3.0.41
I just went ahead and created a test project using awcodes/filament-curator:2.10.1
and filament/filament:2.17.53
and can confirm that the acceptedFileTypes
array does work as expected. The list of available files is filtered down to just the types that I specify on the field. So it looks like a v3 specific issue.
from filament-curator.
Ok. I'll get it corrected as soon as I can. Thank you.
from filament-curator.
Ok. I'll get it corrected as soon as I can. Thank you.
Thank you so much for the awesome plugin 👏👏
from filament-curator.
Related Issues (20)
- registerRenderHook does not check if Panel actually loads Curator Plugin HOT 1
- Curator picker field not working anymore after update HOT 12
- .filepond--root has inlined fixed height when using `multiple` causing previews to be hidden
- Column not found: 1054 HOT 16
- Filament Curator Srcset Not Changing Image Sizes HOT 1
- shouldRegisterNavigation Closure type missing HOT 1
- Error when changing to list view
- encountered the "The file field must be an array" error when adding files with maxItems()
- The CuratorPicker modal dose'nt open in modular structure HOT 2
- CuratorPicker with Multiple images have weird behavior HOT 11
- defaultImageUrl doesn't work with CuratorColumn HOT 3
- CuratorPicker Not Working in Livewire HOT 5
- Watermark doesn't work HOT 3
- Unable to insert/select uploaded animated webp image HOT 4
- CuratorPicker Multiple Selection on Single Relationship HOT 2
- OriginalFilename missing from table create script after fresh new install HOT 5
- Can't add a video mp4 file with the curator picker HOT 2
- Media Resource List Page HOT 5
- Image source not readable error while uploading file using Filament-Curator plugin
- S3 Uploads: Image source not readable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filament-curator.