[whatwg] canvas, img, file api and blobs
stef at epardaud.fr
Tue Feb 16 04:17:55 PST 2010
On Tue, Feb 16, 2010 at 04:10:38AM -0800, Jonas Sicking wrote:
> Ah, sorry, it is indeed the idea that you can get a pre-filled
> FormData from a <form>. Something like:
> formData = myForm.getFormData();
> after which you can do:
> formData.append("thefile", myProcessedFile);
> This isn't in any spec yet, so the exact syntax might change, but it
> won't get more complex than this.
Right, this is simpler, but I still need to:
- Clear the <input type="file"> selection I've replaced with processed
files, so they don't get submitted as well.
- Allocate the XMLHttpRequest
- Handle the response
- Process any eventual redirects.
This is all fine when you want to do AJAX, but unless HTML5 drops
regular non-AJAX <form> submission, I don't understand why we would
mandate that processed File submission be done only using AJAX.
More information about the whatwg