<?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: Adobe Flex &#8211; File Upload and Download</title>
	<atom:link href="http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/</link>
	<description>Programming with Flash, Flex and PHP</description>
	<lastBuildDate>Fri, 02 Jul 2010 17:53:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Monte</title>
		<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/comment-page-1/#comment-3378</link>
		<dc:creator>Monte</dc:creator>
		<pubDate>Mon, 28 Jun 2010 18:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/#comment-3378</guid>
		<description>Is there a way to execute uploaded data at back end to generate a graph in front end?</description>
		<content:encoded><![CDATA[<p>Is there a way to execute uploaded data at back end to generate a graph in front end?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: santiago</title>
		<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/comment-page-1/#comment-3294</link>
		<dc:creator>santiago</dc:creator>
		<pubDate>Wed, 23 Jun 2010 13:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/#comment-3294</guid>
		<description>great example!

now, I need the files to be in a secure area, only accesible via my FLEX app.... what should I do? how can I store the files in my MySQL database and download them directly from it? and not get a URL that anyone could copy and then download my file without login in to my FLEX app.

thanks!!</description>
		<content:encoded><![CDATA[<p>great example!</p>
<p>now, I need the files to be in a secure area, only accesible via my FLEX app&#8230;. what should I do? how can I store the files in my MySQL database and download them directly from it? and not get a URL that anyone could copy and then download my file without login in to my FLEX app.</p>
<p>thanks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eom</title>
		<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/comment-page-1/#comment-3102</link>
		<dc:creator>eom</dc:creator>
		<pubDate>Mon, 14 Jun 2010 00:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/#comment-3102</guid>
		<description>if you want to work with the web browser, You can be accessed by a html file.  
like this..
############################################
#
# 
#  
#  
#  
#  
#  
#  
#
#</description>
		<content:encoded><![CDATA[<p>if you want to work with the web browser, You can be accessed by a html file.<br />
like this..<br />
############################################<br />
#<br />
#<br />
#<br />
#<br />
#<br />
#<br />
#<br />
#<br />
#<br />
#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenny</title>
		<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/comment-page-1/#comment-552</link>
		<dc:creator>Kenny</dc:creator>
		<pubDate>Wed, 01 Jul 2009 13:19:58 +0000</pubDate>
		<guid isPermaLink="false">http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/#comment-552</guid>
		<description>yo, here is a simple way to do both via flex and php.
&lt;pre class=&quot;brush: php;&quot;&gt;
//upload php script - name this test_file_upload.php


//download script - name this test_file_download.php
 


//now the flex; use onUpload() and onDownload() functions
 
			import flash.events.IOErrorEvent;
			import flash.net.navigateToURL;
			
			private var fileRef:FileReference;
			private function onUpload():void {
				fileRef = new FileReference();
				fileRef.addEventListener(Event.SELECT, selectHandler);
				fileRef.addEventListener(Event.COMPLETE, completeHandler);
				fileRef.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
				try
				{
				    var success:Boolean = fileRef.browse();
				}
				catch (error:Error)
				{
				    trace(&quot;Unable to browse for files.&quot;);
				}
			}
			private	function selectHandler(event:Event):void
				{
					var request:URLRequest = new URLRequest(&quot;http://localhost/test_file_upload.php&quot;);
				    try
				    {
				    	fileRef.upload(request);
					}
				    catch (error:Error)
				    {
				        trace(&quot;Unable to upload file.&quot;);
				    }
				}
			private function completeHandler(event:Event):void
			{
					trace(&quot;uploaded&quot;);
			}
			private function onIOError(event:IOErrorEvent):void {
				trace (event.text);
			}
			private function onDownload():void {
 				var urlReq:URLRequest = new URLRequest(&quot;http://localhost/test_file_download.php&quot;);
 				navigateToURL(urlReq);
 			}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>yo, here is a simple way to do both via flex and php.</p>
<pre class="brush: php;">
//upload php script - name this test_file_upload.php

//download script - name this test_file_download.php

//now the flex; use onUpload() and onDownload() functions

			import flash.events.IOErrorEvent;
			import flash.net.navigateToURL;

			private var fileRef:FileReference;
			private function onUpload():void {
				fileRef = new FileReference();
				fileRef.addEventListener(Event.SELECT, selectHandler);
				fileRef.addEventListener(Event.COMPLETE, completeHandler);
				fileRef.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
				try
				{
				    var success:Boolean = fileRef.browse();
				}
				catch (error:Error)
				{
				    trace("Unable to browse for files.");
				}
			}
			private	function selectHandler(event:Event):void
				{
					var request:URLRequest = new URLRequest("http://localhost/test_file_upload.php");
				    try
				    {
				    	fileRef.upload(request);
					}
				    catch (error:Error)
				    {
				        trace("Unable to upload file.");
				    }
				}
			private function completeHandler(event:Event):void
			{
					trace("uploaded");
			}
			private function onIOError(event:IOErrorEvent):void {
				trace (event.text);
			}
			private function onDownload():void {
 				var urlReq:URLRequest = new URLRequest("http://localhost/test_file_download.php");
 				navigateToURL(urlReq);
 			}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonnie</title>
		<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/comment-page-1/#comment-116</link>
		<dc:creator>Jonnie</dc:creator>
		<pubDate>Wed, 25 Feb 2009 06:41:19 +0000</pubDate>
		<guid isPermaLink="false">http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/#comment-116</guid>
		<description>Ya, I gave the source code to download, did you not get it?</description>
		<content:encoded><![CDATA[<p>Ya, I gave the source code to download, did you not get it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MechanisM</title>
		<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/comment-page-1/#comment-115</link>
		<dc:creator>MechanisM</dc:creator>
		<pubDate>Mon, 23 Feb 2009 01:10:57 +0000</pubDate>
		<guid isPermaLink="false">http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/#comment-115</guid>
		<description>hmm..nice code!! but where&#039;s sql file? or example?</description>
		<content:encoded><![CDATA[<p>hmm..nice code!! but where&#8217;s sql file? or example?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonnie</title>
		<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/comment-page-1/#comment-114</link>
		<dc:creator>Jonnie</dc:creator>
		<pubDate>Fri, 06 Feb 2009 06:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/#comment-114</guid>
		<description>Ya, I will try to get that up soon, what is wrong with the app? I know that for some reason when you run the code on a live server it gets a IO error.</description>
		<content:encoded><![CDATA[<p>Ya, I will try to get that up soon, what is wrong with the app? I know that for some reason when you run the code on a live server it gets a IO error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: José Carlos Fonseca</title>
		<link>http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/comment-page-1/#comment-113</link>
		<dc:creator>José Carlos Fonseca</dc:creator>
		<pubDate>Mon, 02 Feb 2009 15:25:19 +0000</pubDate>
		<guid isPermaLink="false">http://jonniespratley.com/2008/10/08/adobe-flex-file-upload-and-download-to-database/#comment-113</guid>
		<description>Hello!! I´m trying use this code but i can´t put working. Can you help me? Can you put a demo here?

Thank you.</description>
		<content:encoded><![CDATA[<p>Hello!! I´m trying use this code but i can´t put working. Can you help me? Can you put a demo here?</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
