Can't delete image using Webplusm-json-media

Hey guys, i try the plugin in Filament 4 and look really cool, buy need help with 2 problem please: Problem 1: When i create or edit a record i have the icon for add files really big, how can chan the size? problem 2: i try to delete the image that i upload but can see the button for delete one or more file (images) this is my code in the form
<?php
namespace App\Filament\Resources\Products\Schemas;

use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;
use GalleryJsonMedia\Form\JsonMediaGallery;

class ProductForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('category_id')
->required()
->numeric(),
TextInput::make('name')
->required(),
TextInput::make('slug')
->required(),
TextInput::make('price')
->required()
->numeric()
->step(0.01)
->prefix('$'),
TextInput::make('stock')
->required()
->numeric()
->default(0),
RichEditor::make('description')
->required()
->columnSpanFull(),
Toggle::make('featured')
->required(),
JsonMediaGallery::make('images')
->directory('page')
->reorderable()
->preserveFilenames()
->acceptedFileTypes(['image/*'])
->visibility('public') // only public for now - NO S3
->maxSize(4 * 1024)
->maxFiles(8)
->minFiles(1)
->image()
->downloadable()
->deletable()
]);
}
}
<?php
namespace App\Filament\Resources\Products\Schemas;

use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;
use GalleryJsonMedia\Form\JsonMediaGallery;

class ProductForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
TextInput::make('category_id')
->required()
->numeric(),
TextInput::make('name')
->required(),
TextInput::make('slug')
->required(),
TextInput::make('price')
->required()
->numeric()
->step(0.01)
->prefix('$'),
TextInput::make('stock')
->required()
->numeric()
->default(0),
RichEditor::make('description')
->required()
->columnSpanFull(),
Toggle::make('featured')
->required(),
JsonMediaGallery::make('images')
->directory('page')
->reorderable()
->preserveFilenames()
->acceptedFileTypes(['image/*'])
->visibility('public') // only public for now - NO S3
->maxSize(4 * 1024)
->maxFiles(8)
->minFiles(1)
->image()
->downloadable()
->deletable()
]);
}
}
Thank you guys!
No description
No description
2 Replies
Azad Furkan ŞAKAR
You should post it on #webplusm-json-media channel
TranceCode
TranceCodeOP4mo ago
Ok, thank you bro

Did you find this page helpful?