1

I would like to know how to preview the image after it is selected, and before submitting the form on Laravel Nova 4?

# App/Nova/Image.php

/**
 * Get the fields displayed by the resource.
 *
 * @param  \Laravel\Nova\Http\Requests\NovaRequest  $request
 * @return array
 */
public function fields(NovaRequest $request)
{
    return [
        ID::make()->sortable(),
        Image::make('image')->disk('s3')->path('s3-uploads/event_images')->acceptedTypes('image/*'),                      
    ];
}

Is it possible to execute custom javascript on a Laravel Nova Form that detects when the image file is selected and inserts a preview in the form? Or is there a simpler / recommended way to do it?

Thank you

1 Answer 1

1

Dear you can use packages or create custom filed about package I will recommend some package:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.