Created new ticket.
Hi @acf-support
I did as you asked and the file type validation is working as per your screenshot directly when linked to a post but when it is placed inside a repeater field it’s not working its showing the warning on selection of wrong format file but the select button is not disabled and on file upload of wrong format it’s allowing the file to be uploaded instead of throwing an error.
ReChecked on clean install on localhost.
Hi @acf-support
What’s Happening is On selecting a file from the media library or uploading its showing a restricted message but is allowing me to pick the wrong format file and save the same without any error thrown.
No error thrown on save/update
Warning shown on wrong file selection
I’m using php code to include the acf fields
array (
'key' => 'field_18',
'label' => 'Documents:',
'name' => 'documents',
'type' => 'file',
'instructions' => '',
'required' => 1,
'conditional_logic' => 0,
'wrapper' => array (
'width' => 50,
'class' => '',
'id' => '',
),
'return_format' => 'url',
'library' => 'all',
'min_size' => '',
'max_size' => '',
'mime_types' => 'jpg,jpeg',
),
I’m asking this because I’m using ajax to get/post and manipulate around 10-15 fields of a post that has 25-30 fields in total. Right now I’m using a mix of both in my plugin and want to stick to one way for consistency.
In wordpress I observed ajax requests if not coded properly end up using a lot of resources. So I was hoping there was some statistics or comparisons of some kind.
@thisislawatts Thanks this helped me a lot
Hello Dave,
I was wondering about the same thing.
Can you post about the scenarios you tried and the results?
Follow up with error screenshot
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.