<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Removing the extra characters appended to an uploaded file on download</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Removing the extra characters appended to an uploaded file on download</description>
<language>en</language>
<pubDate>Sat, 20 Jun 2026 17:56:53 +0000</pubDate>

<item>
<title>yuniar on "Removing the extra characters appended to an uploaded file on download"</title>
<link>https://www.machform.com/forums/topic/removing-the-extra-characters-appended-to-an-uploaded-file-on-download#post-10173</link>
<pubDate>Thu, 12 Aug 2010 09:44:33 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">10173@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Those tokens can't be removed completely, but it can be reduced.&#60;br /&#62;
From this one:&#60;/p&#62;
&#60;p&#62;'element_3_36f8156c09d5133251dd578e252a1441-2-freedom from.mp3'&#60;/p&#62;
&#60;p&#62;to became this one:&#60;br /&#62;
'element_3_-2-freedom from.mp3'&#60;/p&#62;
&#60;p&#62;The reason for that code is to associate your file with the correct form submission and prevent duplicate file overwrite.&#60;/p&#62;
&#60;p&#62;If we remove the code completely, people uploading the file using the same file name would overwrite the old file.
&#60;/p&#62;</description>
</item>
<item>
<title>justinseipel on "Removing the extra characters appended to an uploaded file on download"</title>
<link>https://www.machform.com/forums/topic/removing-the-extra-characters-appended-to-an-uploaded-file-on-download#post-10164</link>
<pubDate>Thu, 12 Aug 2010 03:22:43 +0000</pubDate>
<dc:creator>justinseipel</dc:creator>
<guid isPermaLink="false">10164@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Any way we can have these just not added at all to the file? I'd like to just download all of the files directly form the &#34;files&#34; directory via &#60;a href=&#34;http://FTP.&#34; rel=&#34;nofollow&#34;&#62;FTP.&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>neilo on "Removing the extra characters appended to an uploaded file on download"</title>
<link>https://www.machform.com/forums/topic/removing-the-extra-characters-appended-to-an-uploaded-file-on-download#post-7530</link>
<pubDate>Thu, 01 Oct 2009 13:47:52 +0000</pubDate>
<dc:creator>neilo</dc:creator>
<guid isPermaLink="false">7530@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Wow - that is so brilliant - and quick. Many thanks.
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Removing the extra characters appended to an uploaded file on download"</title>
<link>https://www.machform.com/forums/topic/removing-the-extra-characters-appended-to-an-uploaded-file-on-download#post-7526</link>
<pubDate>Thu, 01 Oct 2009 13:16:33 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">7526@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;That random hash code is there for security reason.&#60;br /&#62;
To download it, your download script need to strip it.&#60;/p&#62;
&#60;p&#62;Try to edit your download.php file, search around line 166:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;header(&#38;quot;Pragma: public&#38;quot;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;above that line, add this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$filename_only  = $asfname;
$file_1 	   	= substr($filename_only,strpos($filename_only,&#38;#39;-&#38;#39;)+1);
$filename_only 	= substr($file_1,strpos($file_1,&#38;#39;-&#38;#39;)+1);

$header_file = (strstr($_SERVER[&#38;#39;HTTP_USER_AGENT&#38;#39;], &#38;#39;MSIE&#38;#39;)) ? preg_replace(&#38;#39;/\./&#38;#39;, &#38;#39;%2e&#38;#39;, $filename_only, substr_count($filename_only, &#38;#39;.&#38;#39;) - 1) : $filename_only;
$asfname     = $header_file;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;that should strip the hash code.
&#60;/p&#62;</description>
</item>
<item>
<title>neilo on "Removing the extra characters appended to an uploaded file on download"</title>
<link>https://www.machform.com/forums/topic/removing-the-extra-characters-appended-to-an-uploaded-file-on-download#post-7512</link>
<pubDate>Thu, 01 Oct 2009 04:11:41 +0000</pubDate>
<dc:creator>neilo</dc:creator>
<guid isPermaLink="false">7512@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Dear Appnitro people,&#60;/p&#62;
&#60;p&#62;When a the form is used to upload a file, it appends a string of (what appears to be) random characters to the file name. For instance,  the file &#60;/p&#62;
&#60;p&#62;&#60;em&#62;'freedom from.mp3'&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;gets renamed &#60;/p&#62;
&#60;p&#62;&#60;em&#62;'element_3_36f8156c09d5133251dd578e252a1441-2-freedom from.mp3'&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;in the machform/data/form_x/files folder and in the database.&#60;/p&#62;
&#60;p&#62;This means that when I create a download link for it (using the smart file script from &#60;a href=&#34;http://www.zubrag.com/scripts/download.php&#34; rel=&#34;nofollow&#34;&#62;http://www.zubrag.com/scripts/download.php&#60;/a&#62;) it downloads the file with that long, somewhat ungainly, file name.&#60;/p&#62;
&#60;p&#62;I notice that when you use the download link from the sent email or the MachForm Form Manager Entries area, it will download with the original correct file name; however I do not want to allow users access to that area.&#60;/p&#62;
&#60;p&#62;I would like to be able for users to download the files with the original filenames.&#60;/p&#62;
&#60;p&#62;The download link on my site looks like:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;a href=&#38;quot;download.php?f=&#38;lt;?php echo $row_Recordset1[&#38;#39;element_3&#38;#39;]; ?&#38;gt;&#38;quot;&#38;gt;Download&#38;lt;/a&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and you can see what I'm trying to do here:  &#60;a href=&#34;http://www.buffalogals.co.uk/Admin/fileshare.php&#34; rel=&#34;nofollow&#34;&#62;http://www.buffalogals.co.uk/Admin/fileshare.php&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;It works fine, except for the characters appended to the file name.&#60;/p&#62;
&#60;p&#62;Any help would be much appreciated.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
