cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: download image without direct link

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 6 Apr 2011 11:31:18 -0700

On Wed, 4/6/11, Dmitry ☻ <evermind_at_live.ru> wrote:
> every time when I try to load image via CMD I got error:
> http://pic2net.ru/view/v/ca2fbc6f9421349396b455b57a699d6d.jpg
>
> When I try to use PowerShell in same way it's load corrupted image.

The error in that screenshot shows that the shell you're using doesn't
support the single quote character for quoting arguments, so curl interprets
it as part of the URL. Since "'http://" URLs aren't supported, it errors
out. Try double quotes instead. Even solving that problem, you'll probably
have problems redirecting binary data via stdout to a file. That may leave
the stream in text mode and corrupt the binary data. Use the -o option instead
to write directly to a file (curl will open it in binary mode by default).

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-06