Is it possible to upload a file to groups files programatically?
I want to make it easier for my client to create a post and have the files they upload protected. I was going to use ACF field type to upload this file then on post save, take that file and ‘send’ it to groups files and get back the id to create the download link.
I can hook into save post and get the file from ACF easily and looking at the docs I can get the id once the groups file is created using groups_created_file. Can I somehow send the file from ACF (which will upload it to the uploads directory) and send it to groups files?