Results 1 to 3 of 3

Thread: Download file from http/https

  1. #1

    Thread Starter
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Download file from http/https

    Hello Everybody,

    On my page load, I need to download a file say http://example.com/file.csv or https://example.com/file.csv to some location on my web server without prompting save as dialog box. Means it will be a download in background from some server to my server. Any ideas on how to do this?

    Thanks.

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,605

    Re: Download file from http/https

    I think you can simply copy the file as you do with vb.net with System.Io . I am pretty sure that the file can be copied outside of your web site limits but you must use your full server path and NOT the relative path. For example "c:\myotherwebsites\afolder"
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: Download file from http/https

    The ftpwebrequest methods will do it if you have the ftp credentials to access the remote server.

    http://msdn.microsoft.com/en-us/library/ms229711.aspx
    The problem with computers is their nature is pure logic. Just once I'd like my computer to do something deluded.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width