Saving files before new record will be created

Hi there,

I’m searching for a solution for the following issue:

I have a form, e.g. a post, within post form you would like to have the possibiliy to save various files. Before you press the create button in the post form, there should be a possibility to upload attached files. How can I asign and save the files in fact, the post is not still created yet? Can I cache the post record? What is here best practices?



Either save draft post or assign files a temporary ID.

good idea, how can assign fles a temporary ID? :-/

Upload using AJAX. For each uploaded file save ID = something_generated_and_unique. Once 1st file is uploaded, add ID to the form as a hidden field.