I’ve got a front-end form with a file uploader. I’m using the ‘basic’ uploader and have file type restricted to PDF. It’s working. All the uploads go to the media library, which seems a bit odd in this scenario. (The media library contains assets the site owner creates/provides. The front-end form is user-generated content.)
There should be a distinction so they can be managed separately. Does anyone have suggestions on how that might be accomplished?
Hi @hazard.
WordPress only has one way of handling media out of the box. There’s both pros and cons to this. ACF itself isn’t really a content generating plugin nor is the main focus on front-end. It’s firstly a great GUI for meta data and a way to easily interact with advanced meta data (API). When it comes to the file/gallery/image fields ACF uses all native WordPress functions and thus treats anything uploaded the same way as if you would’ve used the core media uploader.
However I think with a bit of hooks into WordPress core you might be able to change the upload paths for specific post types. I found this post that might get you started:
http://wordpress.stackexchange.com/questions/95829/set-custom-upload-path-for-custom-post-type-only
Yeah, I completely understand. This isn’t directly an ACF issue. One of the reasons I’ve used ACF extensively over the last few years though is that it has always allowed me to keep the admin UX simple and painless for my clients, even when building fairly complex systems. I was hoping for a similar clean solution here, but it seems a little complexity for the client may be inevitable this time.
Thanks for the suggestion, I’ll see where it leads. I’m open to hearing if anyone else has had experience with this as well.
another solution I think you could use is to have Gravity forms for this specific front end form. I’m not 100% sure but I think that they save their files in their own directory. As opposed to ACF their product is focused on front end forms and submissions 🙂
(I hope Elliot doesn’t give me trouble for suggesting another solution) 😉
The topic ‘acf_form, file uploads, and media library’ is closed to new replies.
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.