Ok cheesy,

I gave up on uploading the individual shapefile and tried to upload a
zipped shapefile and still I am not able to succeed.

I am implementing the following code to upload a zipped shapefile as per the
 
documentation<http://docs.geoserver.org/stable/en/user/restconfig/rest-config-examples/rest-config-examples-curl.html#uploading-a-shapefile>
,

*    curl -u admi PUT 'Content-type: application/zip' --data-binary
@/var/www/geo/shapefile/zip/Poa_horridula.zip
http://localhost:8080/geoserver/rest/workspaces/acme/datastores/Poa_horridula/Poa_horridula.zip
*

But I am getting following error,

> curl: (6) Couldn't resolve host 'Content-type'
>> No such datastore: acme,Poa_horridula

The document says that the curl code will create the datastore then why am
I getting this error?

Where am I going wrong?

Thanks,
Smaran

On Fri, Nov 9, 2012 at 7:26 PM, cheesybiscuits <[email protected]>wrote:

> Yes I would expect your new command to work fine but there are a few
> possible
> explanations for why it might fail.
>
> 1) the target of your new path is different to your original relative path
> -
> I assume /var/www/geo/shapefile/csvQshp/ does actually contain shapefiles
> 2) you might be seeing permissions issues where Tomcat (or whatever your
> container is) can't read the data. If safe to do so you might want to
> verify
> this by opening up privileges, e.g. something like chmod -R 0744
> /var/www/geo/shapefile/csvQshp
> 3) as the datastore is created I assume there are no permissions issues
> with
> Tomcat / whatever writing to the target directory
>
> If you're still having trouble I would test by identifying a single
> shapefile, rather than the directory
>
> curl -u admin:geoserver -XPUT -H 'Content-type: text/plain' -d
> 'file:///var/www/geo/shapefile/csvQshp/someshape.shp'
> "
> http://localhost:8080/geoserver/rest/workspaces/acme/datastores/csvQshp/external.shp?configure=all
> "
>
>
>
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to