Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. web file properties

web file properties

Scheduled Pinned Locked Moved C#
questionjson
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pyro Joe
    wrote on last edited by
    #1

    hi, I'm making a simple download application. How do I get information about the file before I download it such as its size and name (without all the http information and such)? Also, in many download managers there is the option to download the rest of the file later, how is this done, I'm not asking for the rediculous amount of code it would take, but could you point me in the right direction? Thanks, Stephen

    I D M 3 Replies Last reply
    0
    • P Pyro Joe

      hi, I'm making a simple download application. How do I get information about the file before I download it such as its size and name (without all the http information and such)? Also, in many download managers there is the option to download the rest of the file later, how is this done, I'm not asking for the rediculous amount of code it would take, but could you point me in the right direction? Thanks, Stephen

      I Offline
      I Offline
      iliyang
      wrote on last edited by
      #2

      Well, it is all done using the HTTP headers. One tells you the Content-Length, other tells you the Content-Type, etc. And wneh you make an HTTP request, using another HTTP header (don't remember the exact name) you can tell the offset from which you want to receive tha data. That's it. Just find e good HTTP reference and you'll be OK. Cheers ;)

      1 Reply Last reply
      0
      • P Pyro Joe

        hi, I'm making a simple download application. How do I get information about the file before I download it such as its size and name (without all the http information and such)? Also, in many download managers there is the option to download the rest of the file later, how is this done, I'm not asking for the rediculous amount of code it would take, but could you point me in the right direction? Thanks, Stephen

        D Offline
        D Offline
        DavidNohejl
        wrote on last edited by
        #3

        http://www.codeproject.com/csharp/CoolDownloader.asp[^] David

        1 Reply Last reply
        0
        • P Pyro Joe

          hi, I'm making a simple download application. How do I get information about the file before I download it such as its size and name (without all the http information and such)? Also, in many download managers there is the option to download the rest of the file later, how is this done, I'm not asking for the rediculous amount of code it would take, but could you point me in the right direction? Thanks, Stephen

          M Offline
          M Offline
          Ming_Lei
          wrote on last edited by
          #4

          Using C#, there's FileInfo class that can be instanciated. It gives all the informaion of a file, including size and date created, ect. For the download resume, there is a code at http://www.csharphelp.com/archives/archive9.html[^] that would give some insight of how to do it. ==== Lei Ming 2004 ===== ====================

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups