PDA

View Full Version : Repacking params for a multipart form post



bimargulies
21 Jul 2012, 10:43 AM
Is there an example of setting up a form with a file upload (and other fields) that includes converting the non-file fields into a single blob of JSON and then posting up the results as AJAX? I know how to do this in JQuery. The Submit class seems suspiciously relevant, but I'm not very adroit at find things in the doc here yet. Presumably, unless XHR2 is available and at work, this involves an iframe and jsonp worrying.

(ExtJS 4.1)

scottmartin
27 Jul 2012, 1:42 PM
You can use convert to merge field data:
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Field-cfg-convert

Scott.