<?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: Serving up Files from a database in CakePHP</title>
	<atom:link href="http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp</link>
	<description>get all his digital goodness 24/7</description>
	<lastBuildDate>Sat, 04 Feb 2012 17:05:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Hayden Eastwood</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1719</link>
		<dc:creator>Hayden Eastwood</dc:creator>
		<pubDate>Mon, 15 Nov 2010 12:46:18 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1719</guid>
		<description>Thanks, this is a great little piece of code, and very well explained!</description>
		<content:encoded><![CDATA[<p>Thanks, this is a great little piece of code, and very well explained!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xav0989</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1626</link>
		<dc:creator>xav0989</dc:creator>
		<pubDate>Thu, 22 Jul 2010 16:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1626</guid>
		<description>How about the media view?</description>
		<content:encoded><![CDATA[<p>How about the media view?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1584</link>
		<dc:creator>Eddie</dc:creator>
		<pubDate>Thu, 24 Jun 2010 14:34:48 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1584</guid>
		<description>@Leo

Thanks!  I recently updated my syntax highlighter and it seemed to break several code snippets above.

I have made the fix so everyone can see the right controller, view and model code.

-Eddie</description>
		<content:encoded><![CDATA[<p>@Leo</p>
<p>Thanks!  I recently updated my syntax highlighter and it seemed to break several code snippets above.</p>
<p>I have made the fix so everyone can see the right controller, view and model code.</p>
<p>-Eddie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1582</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Wed, 23 Jun 2010 08:45:26 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1582</guid>
		<description>Eddie - my browser (Firefox 3.6.3) is masking the layout code. Here it is if anybody else is having problems (original is surrounded by php tags):

header(&#039;Content-type: &#039; . $file[&#039;ProjectFile&#039;][&#039;type&#039;]);
if(!isset($inpage)) header(&#039;Content-Disposition: attachment; filename=&quot;&#039;.$file[&#039;ProjectFile&#039;][&#039;name&#039;].&#039;&quot;&#039;);
echo $content_for_layout;
die();</description>
		<content:encoded><![CDATA[<p>Eddie &#8211; my browser (Firefox 3.6.3) is masking the layout code. Here it is if anybody else is having problems (original is surrounded by php tags):</p>
<p>header(&#8216;Content-type: &#8216; . $file['ProjectFile']['type']);<br />
if(!isset($inpage)) header(&#8216;Content-Disposition: attachment; filename=&#8221;&#8216;.$file['ProjectFile']['name'].&#8217;&#8221;&#8216;);<br />
echo $content_for_layout;<br />
die();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: asar</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1578</link>
		<dc:creator>asar</dc:creator>
		<pubDate>Wed, 16 Jun 2010 09:49:11 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1578</guid>
		<description>How to save the image in  database and to
retrieve the image from database and to display in the page. i&#039;ve 
tried that but i cant able to get the proper output. could you pls
help me to do this.</description>
		<content:encoded><![CDATA[<p>How to save the image in  database and to<br />
retrieve the image from database and to display in the page. i&#8217;ve<br />
tried that but i cant able to get the proper output. could you pls<br />
help me to do this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Milos</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1541</link>
		<dc:creator>Milos</dc:creator>
		<pubDate>Fri, 21 May 2010 20:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1541</guid>
		<description>Unfortunately this isn&#039;t fix my problem. I don&#039;t understand how this can work because you didn&#039;t set Content-type. where do you use $inpage?</description>
		<content:encoded><![CDATA[<p>Unfortunately this isn&#8217;t fix my problem. I don&#8217;t understand how this can work because you didn&#8217;t set Content-type. where do you use $inpage?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Serving Files from a database with CakePHP &#124; Edward A. Webb (.com) &#124; Source code bank</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1341</link>
		<dc:creator>Serving Files from a database with CakePHP &#124; Edward A. Webb (.com) &#124; Source code bank</dc:creator>
		<pubDate>Sat, 10 Apr 2010 10:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1341</guid>
		<description>[...] more from the original source: Serving Files from a database with CakePHP &#124; Edward A. Webb (.com)   If you enjoyed this article please consider sharing [...]</description>
		<content:encoded><![CDATA[<p>[...] more from the original source: Serving Files from a database with CakePHP | Edward A. Webb (.com)   If you enjoyed this article please consider sharing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1223</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sun, 11 Oct 2009 06:04:07 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1223</guid>
		<description>Hey, problem solved!

thanks for the help. Turns out one of my helpers was adding a blank line at the top of my page. I switched the downloads to another controller and viola! Works like a charm.

One  quick question though, is there anyway to redirect to a certain page after the download has been initiated?

Thanks for the wonderful component!</description>
		<content:encoded><![CDATA[<p>Hey, problem solved!</p>
<p>thanks for the help. Turns out one of my helpers was adding a blank line at the top of my page. I switched the downloads to another controller and viola! Works like a charm.</p>
<p>One  quick question though, is there anyway to redirect to a certain page after the download has been initiated?</p>
<p>Thanks for the wonderful component!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1220</link>
		<dc:creator>Eddie</dc:creator>
		<pubDate>Fri, 09 Oct 2009 20:25:52 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1220</guid>
		<description>I  would check the php files for blank lines just before or after &lt;?php ?&gt; tags. For example
&lt;pre lang=&quot;PHP&quot;&gt;

&lt;?php
myCode();
?&gt;

&lt;/pre&gt;

As these may be printed and inserted above the cells actually content.

(On that note you try running a dump directly from the cell to be sure your not &lt;em&gt;saving&lt;/em&gt; a blank line when uploading.</description>
		<content:encoded><![CDATA[<p>I  would check the php files for blank lines just before or after < ?php ?> tags. For example</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
myCode<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>As these may be printed and inserted above the cells actually content.</p>
<p>(On that note you try running a dump directly from the cell to be sure your not <em>saving</em> a blank line when uploading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://edwardawebb.com/web-development/cakephp/serving-files-cakephp/comment-page-1/#comment-1219</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 09 Oct 2009 19:46:50 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=72#comment-1219</guid>
		<description>Hi, 

I&#039;m having a little problem using your script to serve zip files. The file downloads perfectly, but if I try to unzip it, I get an error.

I opened the zip file with a text editor and noticed there is a blank line being added at the top of the file. If I remove this line and save the file, it unzips perfectly. Also, if I put the file in a web-accessible directory and navigate directly to the zip file, it works perfectly.

There are no echos or prints in my download action. I&#039;ve tried everything I can think of.

Any suggestions?</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I&#8217;m having a little problem using your script to serve zip files. The file downloads perfectly, but if I try to unzip it, I get an error.</p>
<p>I opened the zip file with a text editor and noticed there is a blank line being added at the top of the file. If I remove this line and save the file, it unzips perfectly. Also, if I put the file in a web-accessible directory and navigate directly to the zip file, it works perfectly.</p>
<p>There are no echos or prints in my download action. I&#8217;ve tried everything I can think of.</p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

