I've never tried sending a manual POST request to the /livewire endpoint. However, the 200 OK response sounds like Livewire is working as intended, since you'd want to re-render the component's view with any validation errors displayed. Or is the file actually being stored when it shouldn't?
Feb 18, 2025
3
Level 1
Laravel Livewire File Upload Restriction
Hi! Im a beginner in Laravel/Livewire projects, so I dont really know much but here's what im doing and the issue im facing.
Im trying to do File Upload Restriction, which on the front end it is working for me, by applying this on my livewire component
$this->validateOnly('photo_1', [ 'photo_1' => 'nullable|image|mimes:jpeg,jpg,png|max:2048', ]);
However, when i test by copying this post request using Postman Interceptor, and send the request on Postman but with different file as testing, somehow the restriction doesn't work, it returns 200 OK.
Any experts here can assist me on this? Thank you
Please or to participate in this conversation.