Laravel 5: mimes validator always returning errors even with right mime type.

Posted 4 years ago by ghvinashvili

@JeffreyWay mimes validator always returning errors even with right mime type, what can i do?

/**
 * Determine if the user is authorized to make this request.
 *
 * @return bool
 */
public function authorize()
{
    return true;
}

/**
 * Get the validation rules that apply to the request.
 *
 * @return array
 */
public function rules()
{
    return [
        'title' => 'required',
        'body' => 'required',
        'date' => 'date',
        'tag_list' => 'required',
        'images' => 'required|mimes:jpeg',
    ];
}

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.