
<?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: client side image resize flash cs4 &#8211; filereference.data</title>
	<atom:link href="http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/</link>
	<description>Programming tips &#38; tools.</description>
	<lastBuildDate>Fri, 13 Jan 2012 14:25:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Rich</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-2/#comment-1487</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Sun, 10 Jul 2011 00:49:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1487</guid>
		<description>Thanks for the excellent and simple script.

RE: Ty&#039;s message on 17th Feb

It would be safer to check the &#039;type&#039; array value for the content-type rather than assuming the files have appropriate extension names. Checking file extension alone relies in the fact the server is correctly configured to parse .whatever extensions in the intended manner. e.g. it is easy to setup Apache to parse .htm files as .php, in the same way a server could be misconfigured to parse .jpg files as shell scripts.

I would simply check the content type to start with &quot;image/&quot; and ignore/delete any files that don&#039;t match.</description>
		<content:encoded><![CDATA[<p>Thanks for the excellent and simple script.</p>
<p>RE: Ty&#8217;s message on 17th Feb</p>
<p>It would be safer to check the &#8216;type&#8217; array value for the content-type rather than assuming the files have appropriate extension names. Checking file extension alone relies in the fact the server is correctly configured to parse .whatever extensions in the intended manner. e.g. it is easy to setup Apache to parse .htm files as .php, in the same way a server could be misconfigured to parse .jpg files as shell scripts.</p>
<p>I would simply check the content type to start with &#8220;image/&#8221; and ignore/delete any files that don&#8217;t match.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pla</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-2/#comment-1470</link>
		<dc:creator>Pla</dc:creator>
		<pubDate>Wed, 04 May 2011 08:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1470</guid>
		<description>This image uploader (single image) has been very helpful for me to find a solution I was looking for many days. I need a little alteration to the main.as to give me an image output with fixed dimentions. For instance, I need an image out put of 100x100pixels (widthxheight) irrespective of input size and proportionate resizing. How can I achieve this? (I am aware that the output image may be awkward). - Thank you in advance.</description>
		<content:encoded><![CDATA[<p>This image uploader (single image) has been very helpful for me to find a solution I was looking for many days. I need a little alteration to the main.as to give me an image output with fixed dimentions. For instance, I need an image out put of 100x100pixels (widthxheight) irrespective of input size and proportionate resizing. How can I achieve this? (I am aware that the output image may be awkward). &#8211; Thank you in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frank</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-2/#comment-1239</link>
		<dc:creator>frank</dc:creator>
		<pubDate>Wed, 23 Feb 2011 20:48:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1239</guid>
		<description>Im new to this put is there a way to open this in flex to debug it ?</description>
		<content:encoded><![CDATA[<p>Im new to this put is there a way to open this in flex to debug it ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ty</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-2/#comment-1238</link>
		<dc:creator>Ty</dc:creator>
		<pubDate>Thu, 17 Feb 2011 16:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1238</guid>
		<description>Thanks much for this -- it worked quickly.  But please: you must make your PHP code more secure!  People are downloading this and dropping it on their servers, after all.

For instance, your code doesn&#039;t check the file that&#039;s uploaded to ensure it&#039;s an image.  I could upload any PHP file I choose and have immediate control over most of the content on your web server!

Here are my edits to the (single-file-upload) PHP file &quot;reciveFile.php&quot;:
http://pastebin.com/7RB6TcRf</description>
		<content:encoded><![CDATA[<p>Thanks much for this &#8212; it worked quickly.  But please: you must make your PHP code more secure!  People are downloading this and dropping it on their servers, after all.</p>
<p>For instance, your code doesn&#8217;t check the file that&#8217;s uploaded to ensure it&#8217;s an image.  I could upload any PHP file I choose and have immediate control over most of the content on your web server!</p>
<p>Here are my edits to the (single-file-upload) PHP file &#8220;reciveFile.php&#8221;:<br />
<a href="http://pastebin.com/7RB6TcRf" rel="nofollow">http://pastebin.com/7RB6TcRf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-2/#comment-1234</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Tue, 11 Jan 2011 23:42:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1234</guid>
		<description>I found a solution to my problem and I thought I might share since it took my a while to find an answer.   

I added this to the reciveFile.php
//////////////Torwards the bottom of the page......
if(move_uploaded_file($_FILES[&#039;Filedata&#039;][&#039;tmp_name&#039;], $target_path)) {
    echo &quot;status=1&amp;filepath=$target_path&amp;size=&quot;.$_FILES[&#039;Filedata&#039;][&#039;size&#039;];
/////////// I put this........ and it fixed my problem
        if(!chmod($target_path, 0755))
            echo &quot;status=0&amp;msg=Error&quot;;

I love this script and it&#039;s been a big help... Thanks again Ady</description>
		<content:encoded><![CDATA[<p>I found a solution to my problem and I thought I might share since it took my a while to find an answer.   </p>
<p>I added this to the reciveFile.php<br />
//////////////Torwards the bottom of the page&#8230;&#8230;<br />
if(move_uploaded_file($_FILES['Filedata']['tmp_name'], $target_path)) {<br />
    echo &#8220;status=1&amp;filepath=$target_path&amp;size=&#8221;.$_FILES['Filedata']['size'];<br />
/////////// I put this&#8230;&#8230;.. and it fixed my problem<br />
        if(!chmod($target_path, 0755))<br />
            echo &#8220;status=0&amp;msg=Error&#8221;;</p>
<p>I love this script and it&#8217;s been a big help&#8230; Thanks again Ady</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cristian</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-1/#comment-1232</link>
		<dc:creator>cristian</dc:creator>
		<pubDate>Wed, 29 Dec 2010 09:03:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1232</guid>
		<description>Great!Good job :)

By the way, if you add &quot;_bitmap.smoothing = true;&quot; after line 169, the generated image will look much better! Congrats, amazing source.</description>
		<content:encoded><![CDATA[<p>Great!Good job :)</p>
<p>By the way, if you add &#8220;_bitmap.smoothing = true;&#8221; after line 169, the generated image will look much better! Congrats, amazing source.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CristianP</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-1/#comment-1229</link>
		<dc:creator>CristianP</dc:creator>
		<pubDate>Mon, 06 Dec 2010 02:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1229</guid>
		<description>Is not working, i get error again and again, i just change the path in the as class and in php file, what can it be? permission 777 to uploads, dont know wht to do</description>
		<content:encoded><![CDATA[<p>Is not working, i get error again and again, i just change the path in the as class and in php file, what can it be? permission 777 to uploads, dont know wht to do</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angl</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-1/#comment-1228</link>
		<dc:creator>Angl</dc:creator>
		<pubDate>Mon, 29 Nov 2010 13:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1228</guid>
		<description>2Dieter:
You open the file “main.as” and &quot;imgUpload.fla&quot; in Adobe Flash. Change _MAX_WIDTH and _MAX_HEIGHT to the output size you need (in “main.as”), then change to &quot;imgUpload.fla&quot; and export movie. Replace the old file &quot;imgUpload.fla&quot; in production-swf folder with the new one (that you have just exported). Voila. :)</description>
		<content:encoded><![CDATA[<p>2Dieter:<br />
You open the file “main.as” and &#8220;imgUpload.fla&#8221; in Adobe Flash. Change _MAX_WIDTH and _MAX_HEIGHT to the output size you need (in “main.as”), then change to &#8220;imgUpload.fla&#8221; and export movie. Replace the old file &#8220;imgUpload.fla&#8221; in production-swf folder with the new one (that you have just exported). Voila. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angl</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-1/#comment-1225</link>
		<dc:creator>Angl</dc:creator>
		<pubDate>Sun, 28 Nov 2010 19:57:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1225</guid>
		<description>Hi,
Thank you very much for the application. Works perfectly - except the message I get after uploading: “Upload Failed”, when actually it is successful. I found where in &quot;main.as&quot;-script I can change it to &quot;Upload successful&quot;, for example - just to avoid confusion for the users. But is it the only solution?
Just if it is important and could influence the result-message: I also changed the line &quot;urlRequest.url = _path+&#039;/reciveFile.php?paragraf=5&#039;;&quot; (added &#039;?paragraf=5&#039;), and also _MAX_WIDTH and _MAX_HEIGHT; have also changed recive.php file and some of JavaScript in html. But I don&#039;t think it could cause the wrong message, because glensbo has described the same problem (didn&#039;t get the answer).</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thank you very much for the application. Works perfectly &#8211; except the message I get after uploading: “Upload Failed”, when actually it is successful. I found where in &#8220;main.as&#8221;-script I can change it to &#8220;Upload successful&#8221;, for example &#8211; just to avoid confusion for the users. But is it the only solution?<br />
Just if it is important and could influence the result-message: I also changed the line &#8220;urlRequest.url = _path+&#8217;/reciveFile.php?paragraf=5&#8242;;&#8221; (added &#8216;?paragraf=5&#8242;), and also _MAX_WIDTH and _MAX_HEIGHT; have also changed recive.php file and some of JavaScript in html. But I don&#8217;t think it could cause the wrong message, because glensbo has described the same problem (didn&#8217;t get the answer).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dieter</title>
		<link>http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/comment-page-1/#comment-1223</link>
		<dc:creator>Dieter</dc:creator>
		<pubDate>Tue, 02 Nov 2010 16:18:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/#comment-1223</guid>
		<description>Hi,
can someone tell me how can I set the output size of the downsized image?

Thank you, Dieter - Germany</description>
		<content:encoded><![CDATA[<p>Hi,<br />
can someone tell me how can I set the output size of the downsized image?</p>
<p>Thank you, Dieter &#8211; Germany</p>
]]></content:encoded>
	</item>
</channel>
</rss>

