Sorry i should’ve pointed out i’ve added it to the allowed file types in my theme functions.
I’ve narrowed it down (somewhat…) since adding the file type to the allowed list, i’ve noticed that if the file has spaces in it, so “file name” it doesn’t get uploaded. Therefore it has to be “file-name” or “file_name” and it uploads it.
HOWEVER it’s still not being attached to the post, BUT when i var_dump the array i get this:
But the url is blank
EDIT: Actually, the filename is also being set the same as the post title.
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!
© 2022 Advanced Custom Fields.