locked
Download file using class library RRS feed

  • Question

  • User-148788041 posted
    Hi
    Using filestream how to download file.

    Filename :ab.doc
    How to download
    Thursday, June 28, 2018 4:26 PM

All replies

  • User753101303 posted

    Hi,

    This is not the purpose of the FileStream class. The easiest way would be to use https://msdn.microsoft.com/en-us/library/ez801hhe(v=vs.110).aspx or give some détails about what you are trying to do.

    You want to have C# code on your web server that is downloading a file from another web server ?

    Edit: ah or you meant you have an existing FileStream and you want to trigger a file download inside the user browser ?

    Thursday, June 28, 2018 5:14 PM
  • User-148788041 posted

    Hi,

    I am creating a function like this that download file .it is not for asp.net form, it is just a function that can be called in any application

    usng System.Io.IMAP4;
    public void Download(Imap4Client cl,string filename)
    {
    
    
    FileStream fs = new (filename.legth)
    
    
    
    }

    Friday, June 29, 2018 1:37 AM
  • User283571144 posted

    Hi Guhananth,

    According to your decription, I couldn't understand your issue clearly.

    Could you please tell me what file path or file you want to download? is it a url or some other class?

    What do you mean about the function could be called by another application?

    Do you mean you want call it from java application or other C# application?

    If you could post more details information, it will be more easily for us to understand your issue and find the solution.

    Best Regards,

    Brando

    Friday, June 29, 2018 9:50 AM
  • User753101303 posted

    Ah so what you really want to do is to download messages ? It would be hard to guess from your first post.

    Have you tried the doc at https://www.hunnysoft.com/nmime/doc/Hunny.Mail.Imap4Client.html which seems also to point to an IMAP documentation when you should find some more info about the IMAP commands that seems to be exposed by this library.

    Saturday, June 30, 2018 12:17 PM