converting %20 to spaces

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ketulp_baroda@yahoo.com

    converting %20 to spaces

    Hi
    I am storing the attachments in files on the server.User can see all
    the attachments & view any of them.
    My application shows the attachment correctly for file which have no
    spaces in their name.
    But it doesnt works for file names with spaces.As the spaces are
    converted to %20.It gives an error:No such file or directory.
    How do I avoid converting of spaces to %20??
    Also one more problem creeped up.
    I am using <input type=file> method for uploading attachmnets..Th en I
    create a file on the server & copy the contents to that file.When I
    display the attachments the text files & html files are displayed
    correctly but the image files are distorted.
    Do I need to escape sequences or do something else?
    Please help
  • John Roth

    #2
    Re: converting %20 to spaces


    <ketulp_baroda@ yahoo.com> wrote in message
    news:f046efac.0 403141156.3135c 1d9@posting.goo gle.com...[color=blue]
    > Hi
    > I am storing the attachments in files on the server.User can see all
    > the attachments & view any of them.
    > My application shows the attachment correctly for file which have no
    > spaces in their name.
    > But it doesnt works for file names with spaces.As the spaces are
    > converted to %20.It gives an error:No such file or directory.
    > How do I avoid converting of spaces to %20??
    > Also one more problem creeped up.
    > I am using <input type=file> method for uploading attachmnets..Th en I
    > create a file on the server & copy the contents to that file.When I
    > display the attachments the text files & html files are displayed
    > correctly but the image files are distorted.
    > Do I need to escape sequences or do something else?
    > Please help[/color]

    Look at the quote() and unquote() functions in the urllib module.

    John Roth


    Comment

    Working...