[ckan-dev] Download text/geojson files, files without extension

David Read david.read at hackneyworkshop.com
Thu Oct 16 10:49:01 UTC 2014


Harold,

Your JSON file is delivered to your browser with the header
"Content-Type: application/json" as you'd expect, and I think it is
normal for your browser to decide whether to display it or download
it. JSON is pretty readable so it makes sense to display it. I imagine
CKAN could add extra headers to tell your browser to download it, but
I'm not sure that is normal or desired - you'd have to build a case
referring to well-known examples on the web where the behaviour was
different.

The problem with downloads without file extensions - are you using
CKAN 2.2? I think you hit this issue:
https://github.com/ckan/ckan/pull/1534
and you just need to upgrade to 2.2.1.

David

On 16 October 2014 11:08, harold carrel <haroldcb at hotmail.fr> wrote:
> HI,
> I've noticed some problems with CKAN and I would like to know if somebody
> has a solution:
> - When I add a text or json file on my CKAN version, or in the CKAN demo
> version (http://demo.ckan.org/fr/), it can display it (I don't know if it
> uses the Data Proxy or not), but when I try to download it, the file is just
> displayed on a new web page instead of beeing downloaded... If you don't see
> what I mean, try on this example:
> http://demo.ckan.org/fr/dataset/sample-json/resource/b834935d-7645-4796-bfdd-a5ff47813d88
> Do someone has a solution to this?
> - I have also noticed that files which don't have extensions in their name
> couldn't be displaed or downloaded, even if the type is specified when
> adding the file on CKAN...
> Does CKAN only accepts file with extensions or is there a solution?
>
> Thanks
> Harold
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>



More information about the ckan-dev mailing list