<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[TinyMCE Forum - Trouble with filename and hanging upload box]]></title>
		<link>http://www.tinymce.com/forum/viewtopic.php?id=7602</link>
		<description><![CDATA[The most recent posts in Trouble with filename and hanging upload box.]]></description>
		<lastBuildDate>Wed, 20 Feb 2008 11:44:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=32612#p32612</link>
			<description><![CDATA[<p>Here is an updated and complete version of my script:<br />This one is handling norwegian characters specialy and replaces all other characters than a-z A-Z 0-9 and _</p><p>===========<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var oldp = &#039;&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while(p != oldp){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oldp = p;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.replace(/\u00E6+/, &#039;ea&#039;); // æ<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.replace(/\u00F8+/, &#039;oe&#039;); // ø<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.replace(/\u00E5+/, &#039;aa&#039;); // å<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.replace(/\u00C6+/, &#039;Ea&#039;); // Æ<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.replace(/\u00D8+/, &#039;Oe&#039;); // Ø<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.replace(/\u00C5+/, &#039;Aa&#039;); // Å&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oldp = &#039;&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while(p != oldp){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oldp = p;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.replace(/\W+/, &#039;_&#039;); // All other characters than a-zA-Z0-9_ is replaced with _<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />========</p><p>Enjoy!</p>]]></description>
			<author><![CDATA[dummy@example.com (GUM Design)]]></author>
			<pubDate>Wed, 20 Feb 2008 11:44:01 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=32612#p32612</guid>
		</item>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=25434#p25434</link>
			<description><![CDATA[<p>Yes that is smart. The older versions had a similar replacement method it also replaced national characters like åäö with aao etc. We will think of a better method of configuring these replacements on uploads for future versions.</p>]]></description>
			<author><![CDATA[dummy@example.com (spocke)]]></author>
			<pubDate>Tue, 31 Jul 2007 13:22:12 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=25434#p25434</guid>
		</item>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=25431#p25431</link>
			<description><![CDATA[<p>Just remember to clear you cache after implementing it...</p>]]></description>
			<author><![CDATA[dummy@example.com (GUM Design)]]></author>
			<pubDate>Tue, 31 Jul 2007 12:58:41 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=25431#p25431</guid>
		</item>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=25430#p25430</link>
			<description><![CDATA[<p>That seemed to do the trick. But still. This is allowing spaces in filenames on the server! Thats breaking a golden rule in server filesystems isn&#039;t it? It works in my browser but it could result in some strange urls like /my%20picture.jpg that may be bad for some scripts.</p><p>So instead I made a hack in /pages/im/js/upload_dialog.js after line #288 that changes all spaces to underscores before upload</p><p>=====Add=====<br />var oldp = &#039;&#039;;<br />while(p != oldp){<br />&nbsp; &nbsp; oldp = p;<br />&nbsp; &nbsp; p = p.replace(/\s+/, &#039;_&#039;);<br />}<br />============</p><p>=== Complete =====<br />&nbsp; &nbsp; &nbsp; &nbsp; onUploadChangeFile : function(e) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var f = e.form, p;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = &#039;&#039; + e.value.replace(/\\/g, &#039;/&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.substring(p.lastIndexOf(&#039;/&#039;) + 1);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.substring(0, p.lastIndexOf(&#039;.&#039;));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var oldp = &#039;&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while(p != oldp){<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oldp = p;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; p = p.replace(/\s+/, &#039;_&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; f.name0.value = p;<br />&nbsp; &nbsp; &nbsp; &nbsp; },<br />=============</p><p>Hope this helps someone!</p><p>Joakim<br /><a href="http://www.gum.no">www.gum.no</a></p>]]></description>
			<author><![CDATA[dummy@example.com (GUM Design)]]></author>
			<pubDate>Tue, 31 Jul 2007 12:57:29 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=25430#p25430</guid>
		</item>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=25421#p25421</link>
			<description><![CDATA[<p>Try changing the filesystem.exclude_file_pattern to &#039;&#039; to see if that has any effect. We will look in to this problem for the next version.</p>]]></description>
			<author><![CDATA[dummy@example.com (spocke)]]></author>
			<pubDate>Tue, 31 Jul 2007 10:24:48 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=25421#p25421</guid>
		</item>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=25420#p25420</link>
			<description><![CDATA[<p>I have the same problem with spaces in filenames as RdeWilde here. I have flash upload disabled and version 3.0.2</p><p>The uploader is complaining about &quot;Filename is Invalid&quot; when I try to upload filnes with spaces in the filename.<br />I is easy to remove spaces in the filename by hand but it shouldn&#039;t be necessary. It should be removed automatically. My customers get all freaked out whenever they see a error screen and doesn&#039;t care to find out what they need to do.</p><p>I hope you could have a look at this for future versions and point me to the js file that handles filename uploads so I may try a fix myself.</p><p>Joakim<br /><a href="http://www.gum.no">www.gum.no</a></p>]]></description>
			<author><![CDATA[dummy@example.com (GUM Design)]]></author>
			<pubDate>Tue, 31 Jul 2007 10:07:28 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=25420#p25420</guid>
		</item>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=24308#p24308</link>
			<description><![CDATA[<p>You could just set the NETWORK_SERVICE user to have modify access to the files. I will look into why spaces can&#039;t be used when uploading. Does it work with files without spaces?</p>]]></description>
			<author><![CDATA[dummy@example.com (spocke)]]></author>
			<pubDate>Thu, 28 Jun 2007 18:24:20 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=24308#p24308</guid>
		</item>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=24288#p24288</link>
			<description><![CDATA[<p>The setting use_flash is already configured false. It won&#039;t help.</p><p>I had a lot of difficulties with getting access and permissions. These worked their way in a lot of process. The main fix was to allow everyone and everywhere. Don&#039;t know if that&#039;s supposed to be named a fix.</p><p>Anyway, is there a way to allow spaces or write my own code to replace the characters (where to place the code?)</p>]]></description>
			<author><![CDATA[dummy@example.com (RdeWilde)]]></author>
			<pubDate>Thu, 28 Jun 2007 10:35:40 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=24288#p24288</guid>
		</item>
		<item>
			<title><![CDATA[Re: Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=24284#p24284</link>
			<description><![CDATA[<p>Oh really what kinds of problems, good to know for future reference? Since the idea and how it works on our test servers is a simple 1 minute installation but some environments are configured in a non standard way and we have tried to think of all of them. <img src="http://www.tinymce.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>1) Try disabling the flash uploaded. It might be an encoding problem in Flash with files and spaces use upload.use_flash=false.<br />2) Same here disable the flash upload thing. I have been saying that a lot these days and that piece of the app will be gone for 3.0.3 you make be sure of that. <img src="http://www.tinymce.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (spocke)]]></author>
			<pubDate>Thu, 28 Jun 2007 08:56:48 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=24284#p24284</guid>
		</item>
		<item>
			<title><![CDATA[Trouble with filename and hanging upload box]]></title>
			<link>http://www.tinymce.com/forum/viewtopic.php?pid=24281#p24281</link>
			<description><![CDATA[<p>After having lots and lots of difficulties getting the imagemanager to run descent, I ran into the following problems that seem inpossible to fix.</p><p>1) I get the error &quot;filename is invalid&quot; all the time. If I have spaces in it for example, it&#039;ll fail. I know, spaces aint nice to have in your filename, but all my clients will. It could rename all the spaces to underscores or something. But where to start? I&#039;m lost after debugging hours and hours. It looks like a basic functionality to me.</p><p>2) The screen with the two buttons only (to upload).&nbsp; &nbsp; Like&nbsp; &nbsp; &nbsp; &nbsp; [ Browse ] [ Upload]&nbsp; &nbsp; &nbsp; &nbsp;, so without text-boxes fail a lot of the time. They&#039;ll upload, but when they&#039;re finished, nothing will happen and the screen just sort of freezes!</p><p>Anyone know how to fix this problems? I can give code as requested.</p>]]></description>
			<author><![CDATA[dummy@example.com (RdeWilde)]]></author>
			<pubDate>Thu, 28 Jun 2007 08:45:12 +0000</pubDate>
			<guid>http://www.tinymce.com/forum/viewtopic.php?pid=24281#p24281</guid>
		</item>
	</channel>
</rss>
