geopython / pywps

PyWPS is an implementation of the Web Processing Service standard from the Open Geospatial Consortium. PyWPS is written in Python.
https://pywps.org
MIT License
176 stars 117 forks source link

ComplexOutput data as reference always generates a file named "input.csv", should be "output". #674

Open ashleysommer opened 1 year ago

ashleysommer commented 1 year ago

Description

When returning a ComplexOutput as Reference (output as_reference is True), the filename generated by the server (and used in the built URL) is always "input", eg "input.csv" for a "txt/csv" output, or "input.xml" for an "application/xml" output. This is misleading to users as this is actually the Output file.

After some digging through the sourcecode, I found where that name is set: https://github.com/geopython/pywps/blob/d0bb9787207e670f4cf8ec5fc3d56abb284226e1/pywps/inout/basic.py#L271-L276

It appears there is no way to set this name on the ComlexOutput object, or on the FileStorage object or on the DataHandler object.

Environment

gschwind commented 1 year ago

Hello,

You can change the output name by storing output data into a file.

https://github.com/geopython/pywps/blob/6293f3d5f69470b252863a838160f6959c83e5cf/pywps/inout/storage/file.py#L29C1-L35C31

Best regards