<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lacisoft&#039;s &#187; file</title>
	<atom:link href="http://www.lacisoft.com/blog/tag/file/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lacisoft.com/blog</link>
	<description>SELECT * FROM lacisoft</description>
	<lastBuildDate>Thu, 09 Sep 2010 18:29:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Typo3 file upload problems</title>
		<link>http://www.lacisoft.com/blog/2009/05/05/typo3-file-upload-problems/</link>
		<comments>http://www.lacisoft.com/blog/2009/05/05/typo3-file-upload-problems/#comments</comments>
		<pubDate>Tue, 05 May 2009 10:05:56 +0000</pubDate>
		<dc:creator>lacisoft</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[em references]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[file_references]]></category>
		<category><![CDATA[tca]]></category>
		<category><![CDATA[typo3]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[uploadfolder]]></category>

		<guid isPermaLink="false">http://www.lacisoft.com/blog/?p=215</guid>
		<description><![CDATA[I&#8217;ve encountered some problems with the TYPO3 backend&#8217;s way of handling files during some work on a picture upload extension. Specifically TYPO3 moves all files you upload to the folder designed as uploadfolder in the field&#8217;s TCA setup. But i do not want this. I want him to leave the files where i put them. Unfortunately replacing the [...]


Related posts:<ol><li><a href='http://www.lacisoft.com/blog/2010/08/24/add-a-file-upload-to-typo3-flexform/' rel='bookmark' title='Permanent Link: Add a file upload to TYPO3 Flexform'>Add a file upload to TYPO3 Flexform</a></li>
<li><a href='http://www.lacisoft.com/blog/2010/01/17/powermail-file-upload-size/' rel='bookmark' title='Permanent Link: Powermail file upload size'>Powermail file upload size</a></li>
<li><a href='http://www.lacisoft.com/blog/2009/01/25/about-typo3-powermail-and-sr_freecap-problems/' rel='bookmark' title='Permanent Link: About Typo3, powermail and sr_freecap problems'>About Typo3, powermail and sr_freecap problems</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve encountered some problems with the TYPO3 backend&#8217;s way of handling files during some work on a picture upload extension. Specifically TYPO3 moves all files you upload to the folder designed as uploadfolder in the field&#8217;s TCA setup.</p>
<p>But i do not want this. I want him to leave the files where i put them. Unfortunately replacing the uploadfolder value with an empty string made TYPO3 to store the whole path to the file, something like: var/www/vhosts/example.com/&#8230;</p>
<p>This is not good either. I want him to store the relative filepath to the fileadmin folder. I&#8217;ve discovered <a href="http://bugs.typo3.org/view.php?id=6039">this issue</a> on the TYPO3 bugtracker which provided me the solution. There is also a nice little extension called <a href="http://typo3.org/extensions/repository/view/em_references/current/">eM References</a> that enables you to change this behavior.</p>
<p>After you installed the extension practically you need to change in TCA the internal type of the field from &#8216;file&#8217; to &#8216;file_references&#8217; and skip the uploadfolder setting entirely. This way the file will be uploaded where you need it and a relative path (a filereference) is stored in the database. No more copying of the file made by TYPO3 in places you didn&#8217;t want to.</p>
<p>To ease your work, here is an example configuration for a TCA entry of file_references type</p>
<pre class="programlisting">"tx_myext_filereferences" =&gt; Array (</pre>
<pre class="programlisting">        "exclude" =&gt; 1,</pre>
<pre class="programlisting">        "label" =&gt; "LLL:EXT:myext/locallang_db.xml:tt_content.tx_myext_filereferences",</pre>
<pre class="programlisting">        "config" =&gt; Array (</pre>
<pre class="programlisting">            "type" =&gt; "group",</pre>
<pre class="programlisting">            "internal_type" =&gt; "file_references",</pre>
<pre class="programlisting">            "allowed" =&gt; $GLOBALS["TYPO3_CONF_VARS"]["GFX"]["imagefile_ext"],</pre>
<pre class="programlisting">            "max_size" =&gt; 1000,</pre>
<pre class="programlisting">            "show_thumbs" =&gt; 1,</pre>
<pre class="programlisting">            "size" =&gt; 3,</pre>
<pre class="programlisting">            "minitems" =&gt; 0,</pre>
<pre class="programlisting">            "maxitems" =&gt; 10,</pre>
<pre class="programlisting">        )</pre>
<p>),</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.lacisoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>Related posts:<ol><li><a href='http://www.lacisoft.com/blog/2010/08/24/add-a-file-upload-to-typo3-flexform/' rel='bookmark' title='Permanent Link: Add a file upload to TYPO3 Flexform'>Add a file upload to TYPO3 Flexform</a></li>
<li><a href='http://www.lacisoft.com/blog/2010/01/17/powermail-file-upload-size/' rel='bookmark' title='Permanent Link: Powermail file upload size'>Powermail file upload size</a></li>
<li><a href='http://www.lacisoft.com/blog/2009/01/25/about-typo3-powermail-and-sr_freecap-problems/' rel='bookmark' title='Permanent Link: About Typo3, powermail and sr_freecap problems'>About Typo3, powermail and sr_freecap problems</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.lacisoft.com/blog/2009/05/05/typo3-file-upload-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
