-
Greetings. I write to request help. I need my screen to display an exception or error alert if an uploaded file is larger than post_max_upload. My screen has an input filed (type file) for selecting a document. When a file smaller than post_max_upload is uploaded, the form works as expected. When a file larger than post_max_upload is uploaded, the upload fails, the screen reloads and does not display any error message. I have tried adding "->middleware(ValidatePostSize::class)" to my routes. I have also added "\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class" to the middleware in platform.php but the problem persists. When I try the upload code using a custom blade (which does not use any orchid components), as expected, laravel throws a PostTooLargeException. How do I get my orchid screen to throw and catch a PostTooLargeException? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It was resolved in the Telegram discussion: When the form is submitted, Ajax is used for a smooth reload. However, if an exception is returned in response, the behavior differs. |
Beta Was this translation helpful? Give feedback.
It was resolved in the Telegram discussion:
When the form is submitted, Ajax is used for a smooth reload. However, if an exception is returned in response, the behavior differs.
To make it consistent, simply add the
->rawClick()
method to the submit button.