You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by go canal <go...@yahoo.com> on 2010/06/26 17:53:09 UTC
upload PDF using curl
Hello,
I am following the example at http://wiki.apache.org/solr/ExtractingRequestHandler
I am using Windows XP, curl 7.19.5, Solr 1.4.1
the command is:
curl http://localhost:8983/solr/update/extract?literal.id=doc1&commit=true' -F "myfile=@tutorial.pdf"
I got error :
HTTP Error: 400. missing content stream.
'commit' is not a recognized as an internal or external command, operable program or batch file.
Any idea what's wrong ?
rgds,
canal
Re: upload PDF using curl
Posted by Lance Norskog <go...@gmail.com>.
There should be a single-quote before the http:. Is this missing in
the command you tried, or is thus just a cut&paste error?
To see exactly what command lines the shell runs, do 'set -x'.
On Fri, Jul 2, 2010 at 5:05 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> : I am using Windows XP, curl 7.19.5, Solr 1.4.1
> :
> : the command is:
> :
> : curl http://localhost:8983/solr/update/extract?literal.id=doc1&commit=true' -F "myfile=@tutorial.pdf"
> :
> : I got error :
> : HTTP Error: 400. missing content stream.
> : 'commit' is not a recognized as an internal or external command, operable program or batch file.
>
> the first line is a bit comfusing -- but it's coming from solr, indicaitng
> that it never got your file (aka: content stream)
>
> the second line is coming from your shell, telling you it can't find a
> command named "commit" to execute -- that's a dead give away that
> something about how you are running curl in your shell doesn't like the
> quotes you used arround the URL -- it's splitting on the "&" character.
>
> i don't have a windows box to test on, but perhaps single quotes will work
> better?
>
>
>
>
> -Hoss
>
>
--
Lance Norskog
goksron@gmail.com
Re: upload PDF using curl
Posted by Chris Hostetter <ho...@fucit.org>.
: I am using Windows XP, curl 7.19.5, Solr 1.4.1
:
: the command is:
:
: curl http://localhost:8983/solr/update/extract?literal.id=doc1&commit=true' -F "myfile=@tutorial.pdf"
:
: I got error :
: HTTP Error: 400. missing content stream.
: 'commit' is not a recognized as an internal or external command, operable program or batch file.
the first line is a bit comfusing -- but it's coming from solr, indicaitng
that it never got your file (aka: content stream)
the second line is coming from your shell, telling you it can't find a
command named "commit" to execute -- that's a dead give away that
something about how you are running curl in your shell doesn't like the
quotes you used arround the URL -- it's splitting on the "&" character.
i don't have a windows box to test on, but perhaps single quotes will work
better?
-Hoss