enketo-express icon indicating copy to clipboard operation
enketo-express copied to clipboard

Extend `pulldata()` to read zipped CSVs

Open joshuaberetta opened this issue 2 years ago • 2 comments

The ability to use pulldata() with zipped CSV files is stated in the XLSForm docs and is allowed with (KoBo)Collect but results in a Failed to fetch exception with Enketo. It would be great to bring this feature to Enketo.

Report in KoBo community forum: https://community.kobotoolbox.org/t/pulldata-with-a-zip-file-not-working/23939

joshuaberetta avatar Oct 29 '21 21:10 joshuaberetta

I didn't realize that was supported (in ODK).

CSVs are transformed to XML in enketo-express, and pulldata is transformed into a native XPath, so an unzip step could be added to enketo-express presumably.

There is a client-side library for zipping already used (for exports) that perhaps could unzip.

MartijnR avatar Nov 01 '21 13:11 MartijnR

Just read the discussion on Zulip wrt to the XForm pointing to .csv and not .zip.

@dorey wrote:

So ODK will request people.csv and if it 404's then it will request people.zip?

Or it downloads all manifest-listed resources, unzips any zipped files, and then matches by filename and extension. That wouldn't work well for a web client.

MartijnR avatar Nov 16 '21 16:11 MartijnR

Community Forum: https://community.kobotoolbox.org/t/pulldata-in-a-form-is-not-reading-zip-media-files-zipped-csv/36243

Kalyan-Lama avatar Dec 09 '22 04:12 Kalyan-Lama