Joan Gu wrote:
There are two components to your question, so I'll break it up.
How can I add a cancel button next to the upload button
According to the W3C spec, a form can only have one button within the
<form></form> tags that submits the form params. As long as you don't need
to carry along the form params on your cancel, the easiest way to do what
you're wanting is to use a button_to outside your form tags and then use CSS
to position it, from a visual perspective, along-side the submit button and
make it _appear_ to the user that side the form has two buttons.
which will stop the uploading of multiple files, and how would it be done?
If you mean 'stop the uploading after its been started', this is a tough one
and I'm not aware of any built-in support in either Ruby or Rails for doing
it. It's a good question though. I know the capability is built into other
tools, so there must be a way to do it. Maybe someone else will be able to
help with this. It's definitely interesting. I'll cipher on it and see if
I can come up with something.