This is a work in progress. ugh!
awcodes / filament-curator Goto Github PK
View Code? Open in Web Editor NEWA media picker plugin for Filament Panels.
License: MIT License
A media picker plugin for Filament Panels.
License: MIT License
This is a work in progress. ugh!
Relates to #206
I upgraded to v2.7.6, added order
column to my relationship pivot table, tried both with and without ->orderColumn('order')
.
Result: after changing sort order of multiple relationship, saving the resource, and refreshing the page - sort order is not saved and order
column value in database is null
.
hi @awcodes,
When I click on the "Curation" tab, sometimes the image isn't displayed in full size. Once I change the size of the browser, the view adjusts. Does this happen to you as well?
Video: https://user-images.githubusercontent.com/789541/226858123-e0b817f1-c8db-4ecc-ab4e-95c8f4f4e41b.mp4
Tested with Safari (Version 16.0) and Firefox (Version 111.0.1)
Greetings,
martin
Currently, the cloud icon only appears if the disk is set to s3 or cloudinary.
return in_array($state, ["cloudinary", "s3"]);
Allow other disks to be included in the cloud list.
An option for later.
Currently the thumbnail is broken if the media is anything but an image, since it's attempting to load it into the src="" attribute.
Detect mimetype and return a standard icon representing the file.
I have field with acceptedFileTypes(['image/jpeg', 'image/png'])
and I can't upload any other file type, but I can pick any file from already uploaded. I can pick mp4 video for this field.
Possible solution in Media model under generateThumbs:
$image = Image::make(
Storage::disk($this->record->disk)->url($media->filename)
);
...
Storage::disk($media->disk)->put(
$pathinfo["dirname"] .
"/" .
$pathinfo["filename"] .
"-" .
$name .
"." .
$media->ext,
$image->stream()
);
Is it possible to create a way of selecting Media for a page.
My code is trying to add the media instead of setting the media_id and using the attach. Which obivously gives error SQLSTATE[HY000]: General error: 1364 Field 'filename' doesn't have a default value
<?php
namespace App\Filament\Resources\PageResource\RelationManagers;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Resources\Table;
use Filament\Tables;
use FilamentCurator\Forms\Components\MediaPicker;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
class MediaRelationManager extends RelationManager
{
protected static string $relationship = 'media';
protected static ?string $recordTitleAttribute = 'alt';
public static function form(Form $form): Form
{
return $form
->schema([
MediaPicker::make('filename')->label('Select')
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('alt'),
])
->filters([
//
])
->headerActions([
Tables\Actions\CreateAction::make(),
])
->actions([
Tables\Actions\EditAction::make(),
Tables\Actions\DeleteAction::make(),
])
->bulkActions([
Tables\Actions\DeleteBulkAction::make(),
]);
}
}
Page class:
class Page extends Model {
public function media()
{
return $this->belongsToMany(Media::class, 'page_media');
}
}
PageResource
class PageResource extends Resource {
///
public static function getRelations(): array
{
return [
MediaRelationManager::class,
];
}
}
The config file has an option to set the acceptedFileTypes but the component still sets the types explicitly within MediaResource. Possible fix:
Update:
->acceptedFileTypes([
"image/jpeg",
"image/png",
"image/webp",
"image/svg+xml",
"application/pdf",
])
To:
->acceptedFileTypes(config('filament-curator.accepted_file_types'))
Hi!
I have an issue with some images that seem to contain malformed exif data. Whenever these are uploaded, the process breaks and returns the following:
Illuminate\Database\Eloquent\JsonEncodingException: Unable to encode attribute [exif] for model [Awcodes\Curator\Models\Media] to JSON: Malformed UTF-8 characters, possibly incorrectly encoded.
Expected behavior would be that the exif data gets fixed or thrown away with a warning instead of making it impossible to upload the image.
Hi! Can I generate webp thumbnails when uploading pictures? And can I prevent the thumbnail size growing if the original picture size is smaller than the thumbnail size?
Sorry for my English, translated it through DeepL))
Like the title says, the close button (x) on the slide-over for database notifications (the bell in the top nav) becomes not clickable with Curator 1.0.0 and up installed. I rolled back to 0.7.7 and it works again on that version.
No idea why (no console errors), I found it by trial and error by removing non-default composer packages one at a time.
This is on the latest version of Filament, 2.16.52 (also tried 2.16.51 to no avail).
Is there any function to add multiple images ? like ->multiple()
I had a small trouble because I have no link to the media directory in my public folder.
It could be interesting (or not ?) to add in the install documentation to run the command
php artisan storage:link
When I try to install this package using the new laravel 10
it shows this message :
Problem 1
- Root composer.json requires awcodes/filament-curator 2.1.2 -> satisfiable by awcodes/filament-curator[v2.1.2].
- awcodes/filament-curator v2.1.2 requires illuminate/contracts ^9.0 -> found illuminate/contracts[v9.0.0, ..., v9.52.0] but these were not loaded, likely because it conflicts with another require.
Thank you for your great library.
I'm encountering an error and have searched through issues and discussions, but I couldn't find a solution. Therefore, I'm creating a new issue.
Steps taken:
Can you please assist me in finding a solution? I'm currently at a standstill.
After install the package and run php artisan curator:install
I tried to roll back the migration then migrate again
but it could not because the media table already exist
then noticed the down function does not exist
The current method attempts to divide the model's size attribute directly. This small adjustment returns the correct unit:
public function sizeForHumans(int $precision = 1): string
{
$units = ["B", "KiB", "MiB", "GiB", "TiB", "PiB"];
$size = $this->size;
for ($i = 0; $size > 1024; $i++) {
$size /= 1024;
}
return round($size, $precision) . " " . $units[$i];
}
I have set up Curator as instructed.
When I launch the modal, I can upload and preview files just fine. They are successfully persisted into the database as well, which is to say they show up in the library when I reload the page and relaunch the curator.
Problem occurs when I try to update/delete media. I get the error Call to a member function update() on array
. You can substitute update()
with delete()
as well.
Problem is here:
public function updateFile(): void
{
$this->selected->update($this->editMediaForm->getState());
}
For some reason, the selected
property is not an array that contains instances of Media, but an array that contains arrayified Media. The setSelection()
method correctly fills the selected
array with Eloquent models, but by the time I get to the update method, it's not an array of Models anymore, so trying to call methods on them raises an error.
I can make it work by modifying updateFile()
or destroyFile()
so that they fetch the model from the DB beforehand. Something along the lines of:
public function updateFile(): void
{
$item = Curator::getMediaModel()::whereId($media[0]['id'])->first();
$item->update($this->editMediaForm->getState());
}
But I get the feeling that I shouldn't need to do that. Am I missing something?
After installing package with composer require awcodes/filament-curator
and php artisan curator:install
, I want to change global settings (f.e. maximum size).
Tutorial suggests to use builder methods on Awcodes\Curator\Facades\Curator
facade.
When I use Curator:maxSize(2000)
I receive a warning from Intelephense:
My guess is that while docblock successfully translates facade method * @method static maxSize(int|Closure $size)
into static
method, it fails to recognize the real return type -- static
, resulting in the warning above.
I suggest adding a second static
keyword to these builder methods to imply real return type:
* @method static static maxSize(int|Closure $size)
same approach as in
Carbon\Traits\Comparison
Error message: Filament\Forms\Components\BaseFileUpload::Filament\Forms\Components\{closure}(): Argument #1 ($file) must be of type Livewire\TemporaryUploadedFile|string, array given
How to reproduce:
The problem is gone after page refresh
Another Problem
Screencast from 07-07-2023 10:32:36 AM.webm
How to reproduce:
Hello,
I would like to crop some images when i generate different sizes instead of resize, is croping possible with this package?
maybe an optinal cropping when width and height are filled?
thank you
How can I change navigation label?
According to the MediaResource class, the navigation label is always Media!
public static function getNavigationLabel(): string
{
return Str::title(static::getPluralModelLabel()) ?? Str::title(static::getModelLabel());
}
Can I change it to below code?
public static function getNavigationLabel(): string
{
return __('curator::views.panel.navigation_label');
}
Whenever I add multiple CuratorPicker::make
to my form, it causes the form to throw an error.
Code:
use Awcodes\Curator\Components\Forms\CuratorPicker;
CuratorPicker::make('thumbnail')
->label('Thumbnail Image')
->disk('local')
->directory('selections'),
CuratorPicker::make('main_image')
->label('Main Image')
->disk('local')
->directory('selections'),
Error:
Awcodes\Curator\Components\Forms\CuratorPicker::Awcodes\Curator\Components\Forms\{closure}(): Argument #2 ($state) must be of type array|int|null, string given, called in...
I'm encountering a rotation bug when creating curation. There may be multiple ways to reproduce this, but what causes it for me is:
From what I can tell Cropper is getting the 90 degree rotation from the EXIF data and sets this in the curation form. However when calling saveCuration
the original image is loaded without the orientation correction and then it's rotated AGAIN since a 90 rotation was set by cropper.
In saveCuration
you can call $image->orientate()
before ->rotate()
which orients the image per the EXIF date, HOWEVER it still applies Cropper's 90 degree rotation so the image will be on it's side.
As of now a workaround is to export the image using an app like Preview before uploading. Exporting the image will "bake in" the orientation preventing the bug.
Emailing the image to yourself is NOT a workaround. The iPhone will convert the HEIC into a JPG, but the EXIF data will still be attached.
Within the created closure on the Media model, self::generateThumbs($media) is being called even if the mimetype is not an image (ie. PDF). This causes a fatal error with Intervention. Possible fix:
static::created(function (Media $media) {
$media->refresh();
if (str($media->type)->contains("image")) {
self::generateThumbs($media);
}
});
Hello,
the image preview on the media page is not working on my installation.
I temporarily fixed it by setting "source_path_prefix" in /src/Http/Controllers/MediaController.php(line 42) to an empty string.
Not working:
$server = ServerFactory::create([ 'response' => new LaravelResponseFactory(app('request')), 'source' => $filesystem->getDriver(), 'source_path_prefix' => 'public', 'cache' => $filesystem->getDriver(), 'cache_path_prefix' => '.cache', 'base_url' => 'curator', ]);
Working:
$server = ServerFactory::create([ 'response' => new LaravelResponseFactory(app('request')), 'source' => $filesystem->getDriver(), 'source_path_prefix' => '', 'cache' => $filesystem->getDriver(), 'cache_path_prefix' => '.cache', 'base_url' => 'curator', ]);
It would be nice if this can be set with a setting.
I am using version 2.0.9.
When changing format inside curator, the image extension doesn't change base on format select, it only change the mimes type.
How to reproduce:
Edit any image, go to curator and change format
Expected result:
Image store in database with correct format selected as well in storage file
This issue is submitted base on Discord discussion
Setting sort order with ->multiple()->relationship(...)
doesn't seem to save - is there some sort of requirement for the pivot table? The drag & drop sort works but after save/refresh the order is not saved.
I see that Filament uses ->orderable()
for a sort column but getting "CuratorPicker::orderable does not exist" https://filamentphp.com/docs/2.x/forms/fields#ordering-items
I just add
CuratorPicker::make("tour_images")
->directory('tour-images')
->preserveFilenames()
->multiple()
->relationship('tour_images', 'id'),
and when I upload and then click Insert after upload. It always give me error undefined array key "alt"
close and open popup again. And then click insert. It works properly but didnt understand why i got this error first place ?
Hello, right now by default, everyone can spoof glide server with mass image transformation.
I think better add signature to glide server https://glide.thephpleague.com/1.0/config/security/
Hello, i have field
CuratorPicker::make('video')
->acceptedFileTypes(['video/*'])
->constrained()
->required(),
i can add new video, but i cant pick existing video
Hello, i use CuratorColumn like this
CuratorColumn::make('preview_image_id')->label('Preview Image')->size(50) or width(50)
and this is url what we have
/curator/articles/article-1.jpg?w=50px&h=40px&fit=crop&fm=webp&s=818c581169f60065dd45164ff0048c58
I think it happens because ImageColumn adds px
to width and height
but w=50px
is invalid parameter for glide
Hello, i use the curator on 2 websites, first is running well, on the second when i use the Media field, i have this error when i try to save the record, when i enter the id of the image manually in the database it works again..
how can i solve this?
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'image' at row 1 (SQL: update
blog_postsset
image= {"id":140,"public_id":"media\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac","filename":"media\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac.jpg","ext":"jpg","type":"image\/jpeg","alt":null,"title":null,"description":null,"caption":null,"width":1920,"height":1030,"disk":"public","directory":"media","size":150547,"created_at":"2022-12-23T18:17:46.000000Z","updated_at":"2022-12-23T18:17:46.000000Z","url":"https:\/\/vietnamholiday.org\/storage\/media\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac.jpg","thumbnail_url":"https:\/\/vietnamholiday.org\/storage\/media\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac-thumbnail.jpg","medium_url":"https:\/\/vietnamholiday.org\/storage\/media\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac-medium.jpg","large_url":"https:\/\/vietnamholiday.org\/storage\/media\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac-large.jpg","size_for_humans":"147 KiB","hasSizes":true},
blog_posts.
updated_at= 2023-01-07 09:08:20 where
id= 19) {"userId":1,"exception":"[object] (Illuminate\\Database\\QueryException(code: 22001): SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'image' at row 1 (SQL: update
blog_postsset
image= {\"id\":140,\"public_id\":\"media\\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac\",\"filename\":\"media\\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac.jpg\",\"ext\":\"jpg\",\"type\":\"image\\/jpeg\",\"alt\":null,\"title\":null,\"description\":null,\"caption\":null,\"width\":1920,\"height\":1030,\"disk\":\"public\",\"directory\":\"media\",\"size\":150547,\"created_at\":\"2022-12-23T18:17:46.000000Z\",\"updated_at\":\"2022-12-23T18:17:46.000000Z\",\"url\":\"https:\\/\\/vietnamholiday.org\\/storage\\/media\\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac.jpg\",\"thumbnail_url\":\"https:\\/\\/vietnamholiday.org\\/storage\\/media\\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac-thumbnail.jpg\",\"medium_url\":\"https:\\/\\/vietnamholiday.org\\/storage\\/media\\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac-medium.jpg\",\"large_url\":\"https:\\/\\/vietnamholiday.org\\/storage\\/media\\/d23a7716-c7cc-44a0-b3d8-beb631ee91ac-large.jpg\",\"size_for_humans\":\"147 KiB\",\"hasSizes\":true},
blog_posts.
updated_at= 2023-01-07 09:08:20 where
id = 19) at /home/ploi/vietnamholiday.org/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760)
Hello, how can I edit an image (upload a new file instead of an existing one) with the saved file name, metadata, public identifier?
mountedFormAction doesn't have the right component statepath when inside a Repeater field.
Hi @awcodes,
There seems to be an issue when deleting files from the library (FILESYSTEM_DISK=public).
Could you perhaps shed some light on this? Perhaps I'm missing some configuration?
Here's the error and stack trace I get:
ERROR: Unable to retrieve the visibility for file at location: media/96f646eb-9f3a-4267-a0d5-50621a185a52.jpg. {"userId":1,"exception":"[object] (League\\Flysystem\\UnableToRetrieveMetadata(code: 0): Unable to retrieve the visibility for file at location: media/96f646eb-9f3a-4267-a0d5-50621a185a52.jpg. at ...\\vendor\\league\\flysystem\\src\\UnableToRetrieveMetadata.php:49)
[stacktrace]
#0 ...\\vendor\\league\\flysystem\\src\\UnableToRetrieveMetadata.php(34): League\\Flysystem\\UnableToRetrieveMetadata::create('media/96f646eb-...', 'visibility', '', NULL)
#1 ...\\vendor\\league\\flysystem-local\\LocalFilesystemAdapter.php(369): League\\Flysystem\\UnableToRetrieveMetadata::visibility('media/96f646eb-...', '')
#2 ...\\vendor\\league\\flysystem\\src\\Filesystem.php(160): League\\Flysystem\\Local\\LocalFilesystemAdapter->visibility('media/96f646eb-...')
#3 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Filesystem\\FilesystemAdapter.php(443): League\\Flysystem\\Filesystem->visibility('media/96f646eb-...')
#4 ...\\vendor\\awcodes\\filament-curator\\src\\Models\\Media.php(40): Illuminate\\Filesystem\\FilesystemAdapter->getVisibility('media/96f646eb-...')
#5 [internal function]: Awcodes\\Curator\\Models\\Media->Awcodes\\Curator\\Models\\{closure}(NULL, Array)
#6 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes.php(677): call_user_func(Object(Closure), NULL, Array)
#7 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes.php(701): Illuminate\\Database\\Eloquent\\Model->mutateAttributeMarkedAttribute('url', NULL)
#8 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes.php(213): Illuminate\\Database\\Eloquent\\Model->mutateAttributeForArray('url', NULL)
#9 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(1638): Illuminate\\Database\\Eloquent\\Model->attributesToArray()
#10 ...\\vendor\\livewire\\livewire\\src\\HydrationMiddleware\\HydratePublicProperties.php(244): Illuminate\\Database\\Eloquent\\Model->toArray()
#11 ...\\vendor\\livewire\\livewire\\src\\HydrationMiddleware\\HydratePublicProperties.php(224): Livewire\\HydrationMiddleware\\HydratePublicProperties::filterData(Object(Awcodes\\Curator\\Resources\\MediaResource\\EditMedia), 'record')
#12 ...\\vendor\\livewire\\livewire\\src\\HydrationMiddleware\\HydratePublicProperties.php(112): Livewire\\HydrationMiddleware\\HydratePublicProperties::dehydrateModel(Object(Awcodes\\Curator\\Models\\Media), 'record', Object(Livewire\\Response), Object(Awcodes\\Curator\\Resources\\MediaResource\\EditMedia))
#13 [internal function]: Livewire\\HydrationMiddleware\\HydratePublicProperties::Livewire\\HydrationMiddleware\\{closure}(Object(Awcodes\\Curator\\Models\\Media), 'record')
#14 ...\\vendor\\livewire\\livewire\\src\\HydrationMiddleware\\HydratePublicProperties.php(145): array_walk(Array, Object(Closure))
#15 ...\\vendor\\livewire\\livewire\\src\\LifecycleManager.php(154): Livewire\\HydrationMiddleware\\HydratePublicProperties::dehydrate(Object(Awcodes\\Curator\\Resources\\MediaResource\\EditMedia), Object(Livewire\\Response))
#16 ...\\vendor\\livewire\\livewire\\src\\Connection\\ConnectionHandler.php(15): Livewire\\LifecycleManager->dehydrate()
#17 ...\\vendor\\livewire\\livewire\\src\\Controllers\\HttpConnectionHandler.php(21): Livewire\\Connection\\ConnectionHandler->handle(Array)
#18 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php(46): Livewire\\Controllers\\HttpConnectionHandler->__invoke('awcodes.curator...')
#19 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(260): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Livewire\\Controllers\\HttpConnectionHandler), '__invoke')
#20 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(205): Illuminate\\Routing\\Route->runController()
#21 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(799): Illuminate\\Routing\\Route->run()
#22 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(141): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#23 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#24 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#25 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#26 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#27 ...\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#28 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#29 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#30 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#31 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#32 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#33 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#34 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#35 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#36 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#37 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(800): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#38 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(777): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#39 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(741): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#40 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(730): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#41 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(200): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#42 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(141): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#43 ...\\vendor\\livewire\\livewire\\src\\DisableBrowserCache.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#44 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Livewire\\DisableBrowserCache->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#45 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#46 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#47 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php(36): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#48 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#49 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#50 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#51 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#52 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#53 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#54 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#55 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#56 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(180): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#57 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#58 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#59 ...\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#60 ...\\public\\index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#61 {main}
"}
How can I insert video from media curator?
I added the video to the curator media but when I try to select and import the video from curator, the editor doesn't show anything.
Hey,
i have a problem with deleting media. As example if i upload an image it gets saved as:
media/ad10b2f8-d84f-4a10-9924-f65e00238f2c.jpg
A curation then gets saved as:
media/ad10b2f8-d84f-4a10-9924-f65e00238f2c/custom.jpg
If i delete the Media only the original image file gets deleted.
Under usage:
use FilamentCurator\Forms\MediaPicker;
should be,
use FilamentCurator\Forms\Components\MediaPicker;
Hi i have a create form page in which i have added, createOptionsForm in some Select fields , on clicking on them it opens modal to create dependent Data,
On Opening Model, i have a field to add media using Curator to the dependent data, is there any way i can open nested modals.
Currently its not working, its just give me blank page
Create Data Page
I'm trying to use the media picker and the images are stored in storage/app/public/media. I've created another folder for those images in public/assets and I want to get them from there. Is there any way to do that?
File URL from the dashboard: http://127.0.0.1:8000/storage/media/6ab0b41f-8fba-406f-a652-2a5572a0554c.png
When i use Curation Blade Component
<x-curator-curation :media="3" class="h-10" curation="thumbnail" />
i get this error Undefined array key "disk"
Hey! This package looks amazing, and it would be neat to be able to use components from it. However, since there is no license file attached, no-one is allowed to use the code herein. https://choosealicense.com/no-permission/
I would suggest the MIT License, as that's what both Laravel and FilamentPHP uses.
All the best, Caen
I had a bug with str
helper in Laravel 9. I replace with https://laravel.com/docs/9.x/helpers#method-str-contains and it's OK
before
@if (Str($currentItem['type'])->contains('image'))
After
@if (Str::contains($currentItem['type'],'image'))
Files concerned : See https://github.com/awcodes/filament-curator/search?q=contains
I have this error when uploading pdf file : array_walk_recursive(): Argument #1 ($array) must be of type array, null given
\Awcodes\Curator\Components\Modals\CuratorPanel::$pathGenerator expects to be an instance of PathGenerator
while Curator::pathGenerator()
expects string
. So, if I follow the documentation:
Curator::pathGenerator(DatePathGenerator::class);
throws
Cannot assign string to property Awcodes\Curator\Components\Modals\CuratorPanel::$pathGenerator of type ?Awcodes\Curator\Generators\PathGenerator
Most likely it's broken by commit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.