I want to be able to upload files and either immediately or after upload assign multiple categories to them. I have 3 different kinds of PDF document: Treasurer report, minutes, and newsletter. What I want to be able to do is have a user assign a document type prior to the upload and have that type translate into multiple category assignments per document kind, like this:
Treasurer: Assign Categories A, B and upload file to media library
Minutes: Assign Categories C, D and upload file to media library
Newsletter: Assign Categories E, F and upload file to media library
I am aware of wp_handle_upload but have been unable to find anything showing how to use it to set the category at the time it uploads. Is that possible or is there a better way?
wp_upload_bits
and not one of the sideload functions such aswp_handle_upload
? Are you asking how to fix your custom form or are you asking something else? Try to make your question as clear and fully self contained as possible, avoid ambiguity and don't assume people will understand or get the correct reference, if something is broken say how it is broken and how you tested it