Comments (2)
This looks like the python requests library. According the documentation, it seems like passing targetSrs
as a file with text may be the issue. Should that use the data
parameter for that part? Multer expects only one file named upload
and guards against other files being sent. It seems like the multipart request may be labelling targetSrs
as a file here.
Caveat, I know very little about python requests library and may be totally wrong here! If that doesn't work, are you able to send the raw request to me? Note this isn't an issue using the web UI and the way the browser is formatting a multipart request.
from ogre.
You were absolutely right, it was a python requests library issue. I separated the request in two as shown below, and it worked. I was so fixated on Multer that I overlooked the obvious mistake I made. Thank you very much!
url= https://localhost:3000/convert
gmlfile = ('test.gml')
payload = {"upload":('test.gml' , open(gmlfile, "rb"))}
values = {"targetSrs":"EPSG:4326"}
response = requests.post(url, files=payload, data=values)
file_name = 'result.json'
with open(file_name,'w') as f:
f.write(response.text)
f.close()
from ogre.
Related Issues (20)
- outputName param is not working HOT 1
- Issue while converting a shapefile to geojson HOT 3
- Converting from CSV: Geometry not being structured correctly HOT 2
- /convertJson returning 400 HOT 3
- DeprecationWarning: Invalid 'main' field in HOT 6
- stdout maxBuffer length exceeded HOT 3
- spawn ogr2ogr ENOENT HOT 1
- Questions about KMZ conversion and Polar Projections HOT 3
- using fetch in typescript returns {"error":true,"message":"Unexpected field"} HOT 1
- DXF to GeoJson not all layers converted HOT 5
- Use ogre directly from another Script (without API) HOT 5
- Features from all layers get thrown into 1 layer HOT 2
- Random response structure in GeoJson format. HOT 1
- Convert to GeoJSON HOT 2
- Error on conversion to DXF HOT 4
- /convert endpoint broken HOT 12
- Export to DGN HOT 9
- Stdout maxbuffer length exceeded while converting to geojson HOT 3
- /convert unable to convert .zip files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ogre.