Re: How to get file name and length information while downloading an attachment file



On 08/15/2013 09:11 PM, Monil Parmar wrote:
Hi,

Iam trying to download any attached document from mails of naver.com
<http://naver.com>.
But Iam not getting any information regarding the file name and length
of attachment from the header.
I tried to search for "content-disposition" and other header fields, but
no information is received. Infact there is no content-disposition in
header.

You could use SoupLogger (or just iterate through the headers yourself)
to see if there's some other header with that information. But the
general answer is that servers aren't required to send
Content-Disposition or any equivalent data, so if it's not there, then
it's just not there.

I assume you're using some sort of API to figure out what the URL to
download the attachment is? If so, there may be some other way within
the API to get this information.

-- Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]