a:26:{s:9:"#provides";s:21:"dojox.io.xhrMultiPart";s:9:"#resource";s:18:"io/xhrMultiPart.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:29:"dojox.uuid.generateRandomUuid";}}s:25:"dojox.io.__xhrContentArgs";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:863:"dojo.provide("dojox.io.xhrMultiPart"); dojo.require("dojox.uuid.generateRandomUuid"); (function(){ dojox.io.__xhrContentArgs = function(){ // name: String // Name of the form value. // content: String // The contents of the value. // filename: String? // An optional filename to pass to the server, as defined by the boundary. // contentType: String? // An optional content-type (MIME) to pass to the server, if value is being // treated as a file. // charset: String? // Optional charset to pass, for the server to interpret the file correctly. // contentTransferEncoding: String? // Optional transfer encoding header value. this.name = name; this.content = content; this.filename = filename; this.contentType = contentType; this.charset = charset; this.contentTransferEncoding = contentTransferEncoding;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:30:"dojox.io.__xhrContentArgs.name";a:4:{s:8:"instance";s:25:"dojox.io.__xhrContentArgs";s:4:"type";s:6:"String";s:7:"summary";s:23:"Name of the form value.";s:14:"private_parent";b:1;}s:33:"dojox.io.__xhrContentArgs.content";a:4:{s:8:"instance";s:25:"dojox.io.__xhrContentArgs";s:4:"type";s:6:"String";s:7:"summary";s:26:"The contents of the value.";s:14:"private_parent";b:1;}s:34:"dojox.io.__xhrContentArgs.filename";a:4:{s:8:"instance";s:25:"dojox.io.__xhrContentArgs";s:4:"type";s:7:"String?";s:7:"summary";s:71:"An optional filename to pass to the server, as defined by the boundary.";s:14:"private_parent";b:1;}s:37:"dojox.io.__xhrContentArgs.contentType";a:4:{s:8:"instance";s:25:"dojox.io.__xhrContentArgs";s:4:"type";s:7:"String?";s:7:"summary";s:91:"An optional content-type (MIME) to pass to the server, if value is being treated as a file.";s:14:"private_parent";b:1;}s:33:"dojox.io.__xhrContentArgs.charset";a:4:{s:8:"instance";s:25:"dojox.io.__xhrContentArgs";s:4:"type";s:7:"String?";s:7:"summary";s:73:"Optional charset to pass, for the server to interpret the file correctly.";s:14:"private_parent";b:1;}s:49:"dojox.io.__xhrContentArgs.contentTransferEncoding";a:4:{s:8:"instance";s:25:"dojox.io.__xhrContentArgs";s:4:"type";s:7:"String?";s:7:"summary";s:40:"Optional transfer encoding header value.";s:14:"private_parent";b:1;}s:23:"dojox.io.__xhrMultiArgs";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:4042:"dojo.provide("dojox.io.xhrMultiPart"); dojo.require("dojox.uuid.generateRandomUuid"); (function(){ dojox.io.__xhrContentArgs = function(){ // name: String // Name of the form value. // content: String // The contents of the value. // filename: String? // An optional filename to pass to the server, as defined by the boundary. // contentType: String? // An optional content-type (MIME) to pass to the server, if value is being // treated as a file. // charset: String? // Optional charset to pass, for the server to interpret the file correctly. // contentTransferEncoding: String? // Optional transfer encoding header value. this.name = name; this.content = content; this.filename = filename; this.contentType = contentType; this.charset = charset; this.contentTransferEncoding = contentTransferEncoding; } function _createPart(/* dojox.io.__xhrContentArgs */args, /* String */boundary){ // summary // Assemble an array of boundary parts based on the passed values in args. if(!args["name"] && !args["content"]){ throw new Error("Each part of a multi-part request requires 'name' and 'content'."); } var tmp = []; tmp.push( "--" + boundary, "Content-Disposition: form-data; name=\"" + args.name + "\"" + (args["filename"] ? "; filename=\"" + args.filename + "\"" : "") ); if(args["contentType"]){ var ct = "Content-Type: " + args.contentType; if(args["charset"]){ ct += "; Charset=" + args.charset; } tmp.push(ct); } if(args["contentTransferEncoding"]){ tmp.push("Content-Transfer-Encoding: " + args.contentTransferEncoding); } tmp.push("", args.content); return tmp; // Array } function _partsFromNode(/* DOMNode */node, /* String */boundary){ // summary // Assemble an array of boundary parts based on the passed FORM node. var o=dojo.formToObject(node), parts=[]; for(var p in o){ if(dojo.isArray(o[p])){ dojo.forEach(o[p], function(item){ parts = parts.concat(_createPart({ name: p, content: item }, boundary)); }); } else { parts = parts.concat(_createPart({ name: p, content: o[p] }, boundary)); } } return parts; // Array } dojox.io.__xhrMultiArgs = function(){ // url: String // URL to server endpoint. // content: Object? // Contains properties with string values. These // properties will be serialized using multi-part // boundaries. // file: Object? // Alias for "content". Provided for backwards compatibility. // timeout: Integer? // Milliseconds to wait for the response. If this time // passes, the then error callbacks are called. // form: DOMNode? // DOM node for a form. Used to extract the form values // and send to the server; each form value will be serialized // using multi-part boundaries. // preventCache: Boolean? // Default is false. If true, then a // "dojo.preventCache" parameter is sent in the request // with a value that changes with each request // (timestamp). Useful only with GET-type requests. // handleAs: String? // Acceptable values depend on the type of IO // transport (see specific IO calls for more information). // load: Function? // function(response, ioArgs){}. response is an Object, ioArgs // is of type dojo.__IoCallbackArgs. The load function will be // called on a successful response. // error: Function? // function(response, ioArgs){}. response is an Object, ioArgs // is of type dojo.__IoCallbackArgs. The error function will // be called in an error case. // handle: Function? // function(response, ioArgs){}. response is an Object, ioArgs // is of type dojo.__IoCallbackArgs. The handle function will // be called in either the successful or error case. this.url = url; this.content = content; this.file = file; this.timeout = timeout; this.form = form; this.preventCache = preventCache; this.handleAs = handleAs; this.load = load; this.error = error; this.handle = handle;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:27:"dojox.io.__xhrMultiArgs.url";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:6:"String";s:7:"summary";s:23:"URL to server endpoint.";s:14:"private_parent";b:1;}s:31:"dojox.io.__xhrMultiArgs.content";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:7:"Object?";s:7:"summary";s:104:"Contains properties with string values. These properties will be serialized using multi-part boundaries.";s:14:"private_parent";b:1;}s:28:"dojox.io.__xhrMultiArgs.file";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:7:"Object?";s:7:"summary";s:69:"Alias for "content". Provided for backwards compatibility.";s:14:"private_parent";b:1;}s:31:"dojox.io.__xhrMultiArgs.timeout";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:8:"Integer?";s:7:"summary";s:96:"Milliseconds to wait for the response. If this time passes, the then error callbacks are called.";s:14:"private_parent";b:1;}s:28:"dojox.io.__xhrMultiArgs.form";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:8:"DOMNode?";s:7:"summary";s:140:"DOM node for a form. Used to extract the form values and send to the server; each form value will be serialized using multi-part boundaries.";s:14:"private_parent";b:1;}s:36:"dojox.io.__xhrMultiArgs.preventCache";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:8:"Boolean?";s:7:"summary";s:189:"Default is false. If true, then a "dojo.preventCache" parameter is sent in the request with a value that changes with each request (timestamp). Useful only with GET-type requests.";s:14:"private_parent";b:1;}s:32:"dojox.io.__xhrMultiArgs.handleAs";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:7:"String?";s:7:"summary";s:98:"Acceptable values depend on the type of IO transport (see specific IO calls for more information).";s:14:"private_parent";b:1;}s:28:"dojox.io.__xhrMultiArgs.load";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:9:"Function?";s:7:"summary";s:152:"function(response, ioArgs){}. response is an Object, ioArgs is of type dojo.__IoCallbackArgs. The load function will be called on a successful response.";s:14:"private_parent";b:1;}s:29:"dojox.io.__xhrMultiArgs.error";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:9:"Function?";s:7:"summary";s:145:"function(response, ioArgs){}. response is an Object, ioArgs is of type dojo.__IoCallbackArgs. The error function will be called in an error case.";s:14:"private_parent";b:1;}s:30:"dojox.io.__xhrMultiArgs.handle";a:4:{s:8:"instance";s:23:"dojox.io.__xhrMultiArgs";s:4:"type";s:9:"Function?";s:7:"summary";s:168:"function(response, ioArgs){}. response is an Object, ioArgs is of type dojo.__IoCallbackArgs. The handle function will be called in either the successful or error case.";s:14:"private_parent";b:1;}s:21:"dojox.io.xhrMultiPart";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"args";a:1:{s:4:"type";s:23:"dojox.io.__xhrMultiArgs";}}s:6:"source";s:1029:" if(!args["file"] && !args["content"] && !args["form"]){ throw new Error("content, file or form must be provided to dojox.io.xhrMultiPart's arguments"); } // unique guid as a boundary value for multipart posts var boundary=dojox.uuid.generateRandomUuid(), tmp=[], out=""; if(args["file"] || args["content"]){ var v = args["file"] || args["content"]; dojo.forEach((dojo.isArray(v) ? v : [v]), function(item){ tmp = tmp.concat(_createPart(item, boundary)); }); } else if(args["form"]){ if(dojo.query("input[type=file]", args["form"]).length){ throw new Error("dojox.io.xhrMultiPart cannot post files that are values of an INPUT TYPE=FILE. Use dojo.io.iframe.send() instead."); } tmp = _partsFromNode(args["form"], boundary); } if(tmp.length){ tmp.push("--"+boundary+"--", ""); out = tmp.join("\r\n"); } console.log(out); return dojo.rawXhrPost(dojo.mixin(args, { contentType: "multipart/form-data; boundary=" + boundary, postData: out })); // dojo.Deferred";s:7:"summary";s:0:"";}s:16:"args.contentType";a:1:{s:7:"summary";s:0:"";}s:13:"args.postData";a:1:{s:7:"summary";s:0:"";}s:8:"dojox.io";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}