Page 1 of 1

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

PostPosted: Sat Jul 31, 2010 5:11 am
by olivyeah
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

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

PostPosted: Wed Sep 01, 2010 10:55 am
by shannah
Thanks. I've added this patch in svn rev. 1925. Will be included with next release.