When the file input field is populated with a path and the file isn't uploaded yet, the node submit or preview action will upload the file but with no feedback. Because Drupal will implement some upload progress notification in upload(simple) this "hidden upload problem" will be even more frustrating.

This patch does not let the form to be submitted until the file input field gets clean or the file gets attached.

This patch modifies misc/upload.js in order to achieve the desired behaviour by binding to the #node-form and fired upon submit.

One problem tough: It tries to notify the user by a message. I don't know how can I fetch the translated text for the message. If it cannot be done, please give some advice how to communicate the problem for the user. (This is why I set the status to code needs work)

Also please take into account that this is my first patch. Any help is appreciated :)

CommentFileSizeAuthor
upload_unattached_watch.patch1.14 KBmtolmacs

Comments

mtolmacs’s picture

Recently I noticed that the behaviour what this patch was intended to fix is considered required. Anyhow do anyone have any idea how can we switch between allowed "hidden" upload and an alert?