Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Oct 2009
    Posts
    314

    How to know the total size of a file (audio) from HTTPHeaders

    Hi

    I am downloading a audio file . I need to know the total size of the file and also the format of the audio file. Can anyone guide me how to get that

    I did this

    Code:
    case THTTPEvent::EGotResponseHeaders:
    {
    RHTTPResponse resp = aTransaction.Response();
    
    TInt status = resp.StatusCode();
    
    RHTTPHeaders headerinfo = resp.GetHeaderCollection();
    Now in the headerinfo i have functions GetField which i guess will help me in knowing the desired things i.e., the total size of the audio file and its format .But i dont know how to use them .

    Can anyone guide me ..suppose i have a audio file a.mp3 on a server then how can i know its total sise and format

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Gurgaon,India
    Posts
    4,114

    Re: How to know the total size of a file (audio) from HTTPHeaders

    Already provided you with a link on your previous thread.

  3. #3
    Regular Contributor
    Join Date
    Oct 2009
    Posts
    314

    Re: How to know the total size of a file (audio) from HTTPHeaders

    Hi

    I am not getting the logic from that link ,it talked about the cookies. I havent used GetField earlier to retrieve information about the total size of the file . If somebody can help me with this

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,809

    Re: How to know the total size of a file (audio) from HTTPHeaders

    Yes, we are aware of that you do not like reading/trying anything on your own.
    Visit http://library.forum.nokia.com, search for something related, like for your new favourite method, GetHeaderCollection, and click the second hit ("Specific header formats"). Content-length is the field you could check (just you obviously need to Get it instead of Set).

  5. #5
    Regular Contributor
    Join Date
    Oct 2009
    Posts
    314

    Re: How to know the total size of a file (audio) from HTTPHeaders

    Quote Originally Posted by wizard_hu_ View Post
    Yes, we are aware of that you do not like reading/trying anything on your own.
    Visit http://library.forum.nokia.com, search for something related, like for your new favourite method, GetHeaderCollection, and click the second hit ("Specific header formats"). Content-length is the field you could check (just you obviously need to Get it instead of Set).
    Just that any one knows everything does not make anyone superior or GOD... he or she also has passed through learning stage i guess. Any ways thanks for your concern I have sought out the problem... and if i would not had tried myself i would not have posted my problem.

    Thanks any ways

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,809

    Re: How to know the total size of a file (audio) from HTTPHeaders

    Although I pointed out a page in the documentation, simply running the WebClient example would have lead to the same result: it dumps the headers into a textbox, so you could have found Content-length amongst them. Then tracking back how they get there could have worked.

Similar Threads

  1. How can I get the total memory size?
    By eyalmnm in forum Symbian
    Replies: 4
    Last Post: 2012-07-03, 10:54
  2. Audio Recording settings for the smallest file size
    By rafeeqpv in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-03-06, 05:29
  3. How can I get the total memory size?
    By eyalmnm in forum Mobile Java General
    Replies: 1
    Last Post: 2007-01-11, 16:28
  4. HTTP Connection (how to get total download size?)
    By _nomad_ in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-01-02, 04:45
  5. Replies: 1
    Last Post: 2004-01-19, 10:50

Posting Permissions

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