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();
[/CODE]
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 [B]a.mp3 [/B] on a server then how can i know its total sise and format
Re: How to know the total size of a file (audio) from HTTPHeaders
Already provided you with a link on your previous thread.
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 [B]total size of the file[/B] . If somebody can help me with this
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 [url]http://library.forum.nokia.com[/url], search for something related, like for your new favourite method, [b]GetHeaderCollection[/b], 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).
Re: How to know the total size of a file (audio) from HTTPHeaders
[QUOTE=wizard_hu_;758425]Yes, we are aware of that you do not like reading/trying anything on your own.
Visit [url]http://library.forum.nokia.com[/url], search for something related, like for your new favourite method, [b]GetHeaderCollection[/b], 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).[/QUOTE]
Just that any one knows everything does not make anyone superior or [B]GOD[/B]... 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
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.