Users can upload files to an e-portfolio. I use the plugin custom upload dir, so files uploaded will be put in ./portfolio/%current_user%/%category%.
For uploads in existing posts this works fine, but the users also create new posts with an upload. For these posts this is not working because at the time of the save, the category is not known yet.
So it looks like the post has to be saved first before a file can be uploaded. Is there a way to solve this issue?
Hello, I guess it depends on how your Users create these posts. If Users create posts on the front-end of the site using Forms, then I suppose you could remove the upload field in the Create Post Form and only allow uploads in an Edit Post Form. That might prevent the problem where uploads cannot be categorized in a new post, but requires an additional form submission in the post creation workflow.
Otherwise, I would need to know more about how you want to solve the problem from a Toolset perspective. We offer several APIs that you can use to trigger your own custom code during the Forms submission process, for example cred_save_data and cred_submit_complete: https://toolset.com/documentation/programmer-reference/cred-api/
My issue is resolved now. Thank you!