[Pmwiki-users] Re: Re: spaces in uploaded files

Christian Ridderström chr
Mon Apr 12 05:56:08 CDT 2004


On Sun, 11 Apr 2004, Wayne Lee wrote:

> hi christian,
> 
> thanks for your help, but your suggestion did not work.  when using 
> [[Attachlist:]], files with spaces are listed with the spaces are 
> replaced with +'s.  thus, when i click on it, it can't find that file.
> 
> any other ideas?

The fix I suggested has nothing to do with [[Attachlist:]], that was only
for allowing the filename to contain spaces. But as I think about it
again, it seems that the solution isn't very good. How should this markup
be interpreted:

	Attach:A file with spaces.txt does it end now?

Does that refer to a file called 'A file with spaces.txt' or to a file 
called 'A file with spaces.txt does it end now'...

One possible solution could be to augment the syntax as follows:

	Attach:"A file with spaces.txt"

which would work for any filename that doesn't contain quotes (").
Opinions?

(Using [[Attach:A file with spaces.txt]] won't work since that'll be 
rendered as a [1] or something).

> at what point is the file name being converted with the spaces replaced 
> with +'s?

I have no idea... if you point me to an example I could have a closer look 
at the problem. 

/Christian

> 
> 
> 
> On Apr 9, 2004, at 2:47 PM, Christian Ridderstr?m wrote:
> 
> > On Fri, 9 Apr 2004, Wayne Lee wrote:
> >
> >> hi,
> >>
> >> i think i've been able to use uploaded files with
> >> space by changing in upload.php:
> >>
> >> SDV($UploadNamePattern,'[A-Za-z0-9][ -\w.]*[A-Za-z0-9]');
> >>
> >> to include a space in the middle characters [ -\w.]
> >>
> >> however, i'd like to add this in the UploadExtended
> >> updates that Christian Ridderstr?m made:
> >>
> >> <http://www.pmichaud.com/wiki/Cookbook/UploadExtended>
> >
> > You could try the thing I wrote here:
> > 	http://www.pmichaud.com/wiki/Cookbook/UploadExtended#extensions
> >
> > I haven't tested it though.
> >
> >> also, what's wrong with spaces in filenames anyhow?
> >
> > Historically speaking, when using a command line interface, spaces have
> > been used to separate arguments. E.g. if you write:
> >
> > 	dir My Documents
> >
> > you're trying to do dir on 'My' and 'Documents', instead of 'My 
> > Documents'.
> >
> > /Christian
> >
> > -- 
> > Christian Ridderstr?m                           
> > http://www.md.kth.se/~chr
> >
> >
> >
> > -- 
> > Pmwiki-users mailing list
> > Pmwiki-users at pmichaud.com
> > http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
> 
> 
> --
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
> 
> 

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list