Creating stream with filename having spaces....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hemantbasva
    New Member
    • Oct 2008
    • 12

    #1

    Creating stream with filename having spaces....

    Hi team,

    I am facing issue with creating stream for filename having spaces or %20


    Code:
    using (Stream stream = webclient.OpenRead("http://tryanderror/Lists/Uploaded%20Audio%20Files/Attachments/32/[Songs.PK] Band Baaja Baaraat - 01 - Ainvayi Ainvayi.mp3"))
                    {
    }
    Last edited by hemantbasva; Oct 14 '11, 05:35 AM. Reason: code put in code tag
  • arie
    New Member
    • Sep 2011
    • 64

    #2
    Tell your compiler to interpret the string with the path "literaly" (use @ before string with path):
    Code:
        using (Stream stream = webclient.OpenRead(@"http://tryanderror/Lists/Uploaded%20Audio%20Files/Attachments/32/[Songs.PK] Band Baaja Baaraat - 01 - Ainvayi Ainvayi.mp3"))
                        {
        }
    Works for me.

    Comment

    Working...