Problem:
Client is using the Forms cred_form_ajax_upload_validate hook to restrict the acceptable file types that can be uploaded for a file custom field, but it is not working, the accepted file types are being rejected.
Solution:
Their code wrongly defines the file types which do not match the file type reported by the global $_FILES object used for the test (e.g. they are testing for "application/text" instead of "text/plain".
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_ajax_upload_validate
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Dieses Thema enthält 2 Antworten, hat 2 Stimmen.
Zuletzt aktualisiert von vor 5 Jahren, 11 Monaten.
Assistiert von: Nigel.