nova-flexible-content icon indicating copy to clipboard operation
nova-flexible-content copied to clipboard

Image inside flexible content deleted after update

Open essaaam opened this issue 3 years ago • 3 comments

Hello, I'm using two images fields one inside flexible content and the other outside the flexible content as the following:

Image::make('Imageddd', 'bbbdssdsd')
    ->thumbnail(function ($value, $disk) {
        return $value ? Storage::disk($disk)->url($value) : null;
    }),
Flexible::make('Awards')
    ->button('Add Award')
    ->addLayout('Award', 'basic', [
        Image::make('Imageddd', 'bbbdssdsd')
            ->thumbnail(function ($value, $disk) {
                return $value ? Storage::disk($disk)->url($value) : null;
            })
    ])

and the upload and saving behavior works very well, but when I try to update the form without uploading a new image the old image "only the one inside flexible content" got deleted

kindly help me with that

essaaam avatar Nov 29 '21 09:11 essaaam

This is still an issue, please fix :)

Pondake avatar Feb 12 '22 15:02 Pondake

Plus one

xavinci avatar Mar 22 '22 16:03 xavinci

It's kind of a workaround, but I've discovered that if you add do it like this: Text::make('Foto', 'image'), Image::make('Foto', 'image'), It does not get deleted after being updated.

The only caveat is that every time you wish to change the image, you should empty the field Text before updating.

niv-al avatar Jul 21 '22 18:07 niv-al