upload fail for windows file with space in name [solved]

A place to discuss development of the Xataface core.

upload fail for windows file with space in name [solved]

Postby olivyeah » Sat Jul 31, 2010 5:11 am

Hi,
If you've got problems uploading windows files with space in the filename with the "widget=file & Type=container", you can "patch" a little the Dataface/Formtool/file.php (line49):

Code: Select all
         //.........
            $filename = basename($val['name']);   // we use basename to guard against maliciously named files.

   //**************add this ******************************************************
         
            $filename = str_replace(CHR(32),"_",$filename);

   //*******************************************************************************
            $matches = array(); // ........

So all spaces in filenames becomes "_" ... or whatever you want...

--
oliv
olivyeah
 
Posts: 8
Joined: Mon May 17, 2010 1:58 pm

Re: upload fail for windows file with space in name [solved]

Postby shannah » Wed Sep 01, 2010 10:55 am

Thanks. I've added this patch in svn rev. 1925. Will be included with next release.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 0 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved