<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: YUI Connect asynchronous file uploads</title> <atom:link href="http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/feed/" rel="self" type="application/rss+xml" /><link>http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/</link> <description>Software Engineer developing PHP applications for fun, profit and distraction. Magento, Zend Framework and Symfony</description> <lastBuildDate>Thu, 03 Nov 2011 09:42:16 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>By: Alistair Stead</title><link>http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/#comment-4690</link> <dc:creator>Alistair Stead</dc:creator> <pubDate>Mon, 16 May 2011 08:08:32 +0000</pubDate> <guid
isPermaLink="false">http://www.designdisclosure.com/?p=122#comment-4690</guid> <description>HI Jeromy,Thanks for your comments. Are you using YUI 3? My example is rather old and based on a rather old version of YUI 2.Either way thanks for your input an I hope this helps people that use this functionality.</description> <content:encoded><![CDATA[<p>HI Jeromy,</p><p>Thanks for your comments. Are you using YUI 3? My example is rather old and based on a rather old version of YUI 2.</p><p>Either way thanks for your input an I hope this helps people that use this functionality.</p> ]]></content:encoded> </item> <item><title>By: Jeromy Evans</title><link>http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/#comment-4688</link> <dc:creator>Jeromy Evans</dc:creator> <pubDate>Mon, 16 May 2011 05:03:04 +0000</pubDate> <guid
isPermaLink="false">http://www.designdisclosure.com/?p=122#comment-4688</guid> <description>This example is missing the isUpload argument that  instructs the connection manager to use IOFrameIO for a multi-part upload.YAHOO.util.Connect.setForm(e.currentTarget, true);Note also when isUpload is true, the callback object needs to be different from the one in Alistair&#039;s example.var callback = {
upload: function(o) {
}
};http://developer.yahoo.com/yui/connection/#formsThe button/submit event problem was likely unrelated.</description> <content:encoded><![CDATA[<p>This example is missing the isUpload argument that  instructs the connection manager to use IOFrameIO for a multi-part upload.</p><p>YAHOO.util.Connect.setForm(e.currentTarget, true);</p><p>Note also when isUpload is true, the callback object needs to be different from the one in Alistair&#8217;s example.</p><p>var callback = {<br
/> upload: function(o) {<br
/> }<br
/> };</p><p><a
href="http://developer.yahoo.com/yui/connection/#forms" rel="nofollow">http://developer.yahoo.com/yui/connection/#forms</a></p><p>The button/submit event problem was likely unrelated.</p> ]]></content:encoded> </item> <item><title>By: Alistair Stead</title><link>http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/#comment-1312</link> <dc:creator>Alistair Stead</dc:creator> <pubDate>Mon, 30 Nov 2009 14:19:31 +0000</pubDate> <guid
isPermaLink="false">http://www.designdisclosure.com/?p=122#comment-1312</guid> <description>Hi Alejo,I&#039;m not too sure from the code you have provided what it is you are trying to do but I think I can possibly provide some insight?When you submit multi-part data the form is not submitted as an XML-HTTP request but rather it is submitted to a hidden iFrame as a standard HTTP request. If you are attempting to change your view and response based the type of request it will not function as expected when submitting files. If you are then trying to parse your responseText as JSON this will likely lead to problems. Unless you have a specific requirement to return JSON I normally return a simple HTML response and use innerHTML to place it in the page to show errors and success message.If you would like me to look further please post the code online and I will happily take a look for you.Alistair</description> <content:encoded><![CDATA[<p>Hi Alejo,</p><p>I&#8217;m not too sure from the code you have provided what it is you are trying to do but I think I can possibly provide some insight?</p><p>When you submit multi-part data the form is not submitted as an XML-HTTP request but rather it is submitted to a hidden iFrame as a standard HTTP request. If you are attempting to change your view and response based the type of request it will not function as expected when submitting files. If you are then trying to parse your responseText as JSON this will likely lead to problems. Unless you have a specific requirement to return JSON I normally return a simple HTML response and use innerHTML to place it in the page to show errors and success message.</p><p>If you would like me to look further please post the code online and I will happily take a look for you.</p><p>Alistair</p> ]]></content:encoded> </item> <item><title>By: alejo</title><link>http://www.designdisclosure.com/2009/11/yui-connect-asynchronous-file-uploads/#comment-1310</link> <dc:creator>alejo</dc:creator> <pubDate>Mon, 30 Nov 2009 07:04:51 +0000</pubDate> <guid
isPermaLink="false">http://www.designdisclosure.com/?p=122#comment-1310</guid> <description>thanks for charing this info, really kool !!!!!..i just have a question, when the yui send the request for upload files, in the server side
i can&#039;t use this:
//php code
ob_start();
require(VIEWS.&#039;someFile.php&#039;);
echo json_encode(ob_get_clean());
//in the client side just
var response = YAHOO.lang.JSON.parse(o.responseText);this work good with the other&#039;s request like $_GET or $_POST, but
when i try use that for uploading files, the javascript said:
illegal character with native eval(&#039;(&#039;+o.responseTex+&#039;)&#039;)
and using yui said &quot;SyntaxError&quot;,So i google the solution like for two day and nothing, so my solution
was returned one little json object like:
$response = array(&#039;type&#039;=&gt;&#039;ERR_VALID&#039;, &#039;errors&#039;=&gt;$valid[&#039;errors&#039;]);
echo json_encode($response);And in the client side write a lot off javascript.If you know how parse the entire view in this kind off request,
i would be very grateful
thanks.</description> <content:encoded><![CDATA[<p>thanks for charing this info, really kool !!!!!..</p><p>i just have a question, when the yui send the request for upload files, in the server side<br
/> i can&#8217;t use this:<br
/> //php code<br
/> ob_start();<br
/> require(VIEWS.&#8217;someFile.php&#8217;);<br
/> echo json_encode(ob_get_clean());<br
/> //in the client side just<br
/> var response = YAHOO.lang.JSON.parse(o.responseText);</p><p>this work good with the other&#8217;s request like $_GET or $_POST, but<br
/> when i try use that for uploading files, the javascript said:<br
/> illegal character with native eval(&#8216;(&#8216;+o.responseTex+&#8217;)')<br
/> and using yui said &#8220;SyntaxError&#8221;,</p><p>So i google the solution like for two day and nothing, so my solution<br
/> was returned one little json object like:<br
/> $response = array(&#8216;type&#8217;=&gt;&#8217;ERR_VALID&#8217;, &#8216;errors&#8217;=&gt;$valid['errors']);<br
/> echo json_encode($response);</p><p>And in the client side write a lot off javascript.</p><p>If you know how parse the entire view in this kind off request,<br
/> i would be very grateful<br
/> thanks.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached
Database Caching 1/3 queries in 0.002 seconds using memcached
Object Caching 450/450 objects using apc
Content Delivery Network via Amazon Web Services: S3: designdisclosure.s3.amazonaws.com

Served from: www.designdisclosure.com @ 2012-02-06 05:29:46 -->
