cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cannot open downloaded file(.jpg / mp3)?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 28 May 2006 01:17:57 +0200 (CEST)

On Sun, 28 May 2006, skylark liu wrote:

> I use libcurl to download a file (like abc.jpg) via libcurl. But I
> found the jpg file cannot be open. And the MP3 file also connot be
> played. I check their file size. They differ from their original file
> size. My code is as follows. Do I miss something? Thanks a lot.

> bodyfile = fopen(bodyfilename,"w");

You on Windows? If so, you didn't write the file as binary properly.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-05-28