Skip to content

Multiple files in array (Content-Type: multipart/form-data) #259

Discussion options

You must be logged in to vote

@paulbrosowsky please try @requestMediaType out:

/**
 * @requestMediaType multipart/form-data
 */
public function index(Request $request)
{
    $valideData = $request->validate([
        'files' => ['required', 'array'],
        'files.*' => ['required', 'image:jpg, png', 'max:5120'],
    ]);
}

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@nerisonpitogo
Comment options

@romalytvynenko
Comment options

@nerisongotham
Comment options

@Enesi-George
Comment options

@romalytvynenko
Comment options

Answer selected by paulbrosowsky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants