Closed rjimenezda closed 5 years ago
I actually like the new approach to URL parsing, but maybe it should try to guess the file type if the URL parsing yielded nothing?
For instance, using the mime type of the response, or falling back to the previous approach.
@rjimenezda This is not a bug. The application is actually working as intended and the enhancement is required in order to pass extra params to an third party service when generating a file, e.g. /data.csv?start=[]&end=[]
We already have an open issue to automatically detect the type of file we are trying to dowload
Thx @macrigiuseppe! We'll be aware of the mime type change.
@rjimenezda could you please close this issue?
Describe the bug Before #780, you could import data into kepler from APIs such as the CARTO SQL API, as long as the url ended in a recognized format.
So, for instance, the URL
https://roman-carto.carto.com/api/v2/sql?q=select%20*%20from%20%22roman-carto%22.school_paths&format=geojson
would work nicely, because it ended ingeojson
. You can even specify&filename=out.geojson
.However, #780 introduced a new way of parsing the URI that is more restrictive.
To Reproduce Steps to reproduce the behavior:
https://roman-carto.carto.com/api/v2/sql?q=select%20*%20from%20%22roman-carto%22.school_paths&format=geojson
Expected behavior I would expect the data to be downloaded and imported.