I am implementing the following code to upload an existing shapefile as per the documentation,
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?
UPDATE: I changed the code to upload a zip file but I am still not able to upload any shapefile.
Where am I going wrong?
UPDATE 2: Ok I am almost there
So I changed the command to,
curl -u admin:geoserver -v -XPUT -H 'Content-type: application/zip' --data-binary @/var/www/geo/shapefile/zip/Poa_horridula.zip http://localhost:8080/geoserver/rest/workspaces/acme/datastores/Poa/file.shp
The only problem is that I am able to add the shapefile but the layer is not being published. Is that normal? Do I have to manually publish it?



./shapefile/csv_shp/Stemmodontia_reticulata.shp– R.K. Nov 9 '12 at 6:54///var/www/geo/shapefile/csv_shp/Stemmodontia_reticulata.shpis this the right way to declare the path? – Sam007 Nov 9 '12 at 16:01