My module automatically save new empty node when user create new node and redirect to edit this node. Now, is it possible to make uploaded file on _node_edit form without submitting form?

edit: When user visit "node/add/article" for example, my module save new node type article and redirect user to "node/NID/edit" to edit this node. In node have fields type "image" and "file". User upload image and file. Now, how to alter their (ajaxified) upload process to make this files permanent to node without click on "Save" button on node edit form?

  • Do you mean you want the programatically created node to have a file already on it when they get to the second edit form?
    – rooby
    May 11, 2013 at 7:50
  • Not exactly, I added more explanation in the question.
    – svetlio
    May 11, 2013 at 8:12
  • Why not actually save the file to the node when you save the empty node? Is that an option?
    – rooby
    May 11, 2013 at 8:16
  • no, the user chooses what to upload. The main idea is to ajaxify node edit form (saving each field data when focusout for example) - other input types like text and select are ready, but file upload not
    – svetlio
    May 11, 2013 at 8:22

1 Answer 1


You could try the autosave module, which allows automatic saving of the node form via ajax while the user is editing the form.

If it doesn't do exactly what you are after it would be a great place to look for ideas on how to code it yourself.

Probably if it doesn't do exactly what you want the easiest path might be to make a patch for that module to add what you need, instead of writing something from scratch.

  • Yes, it looked before I made ​​my decision - it is far from my needs, thanks anyway. The question is still ...
    – svetlio
    May 11, 2013 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.