Have you added the correct enc type to the form?
enctype="multipart/form-data"
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
'avatars' => 'nullable|array',
'avatars.*' => 'image|mimes:jpg,png|max:1024',
I need help. Whenever I add file(s), it just sends 204 No Content
It works perfectly fine with other input types.
import { useForm } from 'laravel-precognition-vue-inertia';
const form = useForm('post', route('account.store'), {
people: [],
avatars: [],
});
I tried adding a header { headers: { 'Content-Type': 'multipart/form-data' } } like in axios but it didn't work. Tried adding forceFormData: true like in inertia but it didn't work either.
Please or to participate in this conversation.