I'm trying to make an application that let the user upload his shapefiles and manage him (show/hide, delete, edit, etc...) I read in the GeoServer documentation that a WFS is the service that can help me to accomplish my purpose.

I searched enough to find an example on how to upload shapefile using this service but I found nothing so I'll be glad I someone help me out.


You have to convert it to GML and POST it at the WFS-T endpoint.

Check out this implementation in Leaflet: https://github.com/Flexberry/Leaflet-WFST

This is assuming you're using JavaScript? Basically, I'd use a library, either native Open Layers or that Leaflet plugin linked above.

If you really want to implement it yourself, check out the WFS standard.

Since you're using OpenLayers, you can use the built in WFS-T functions.

See here: https://medium.com/@goldrydigital/wfs-t-with-openlayers-3-16-6fb6a820ac58 (linked from this other answer).

Here's the OpenLayers example and this is the OL Documentation for WFS Transation.

|improve this answer|||||
  • actually I'm currently using OpenLayer so if there is an example on how to do it with OpenLayer I'll be glad if you help me out with it – Rami ZK Mar 15 '17 at 9:50
  • I'll edit my answer, @RamiZK – Alex Leith Mar 16 '17 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.