diff --git a/index.ts b/index.ts index 8246917..c3f2b27 100644 --- a/index.ts +++ b/index.ts @@ -142,6 +142,7 @@ class Ogre { } let input = b.jsonUrl || data + let output = b.outputName || 'ogre' let opts = { format: (b.format || 'ESRI Shapefile').toLowerCase(), @@ -153,7 +154,7 @@ class Ogre { if ('forceUTF8' in b) opts.options.push('-lco', 'ENCODING=UTF-8') let out = await ogr2ogr(input, opts) - res.attachment('ogre' + out.extname) + res.attachment(output + out.extname) if (out.stream) { out.stream.pipe(res) diff --git a/public/index.html b/public/index.html index ee0adc2..d385a6a 100644 --- a/public/index.html +++ b/public/index.html @@ -268,7 +268,7 @@
outputName
- (optional) - the name for the resulting zip file
+ (optional) - the name for the resulting file
forceUTF8