XLSForm / pyxform

A Python package to create XForms for ODK Collect.
BSD 2-Clause "Simplified" License
82 stars 137 forks source link

URL values in video, audio and image columns #232

Open MartijnR opened 6 years ago

MartijnR commented 6 years ago

Pyxform prepends jr://image, jr:video, jr:audio to any value in these columns, which is great for simple filenames and complies with the XForms spec.

When a user enters https://example.com/myimage.jpg in the image column, this gets turned into jr://image/https://example.com/myimage.jpg.

This is unsupported usage and the result is unhelpful. What would be helpful is to either:

  1. detect the https?:// scheme and if present, do not prepend a jr://(image|video|audio) scheme.
  2. output an error

Strictly speaking the second option is best in terms of ODK XForms spec adherence. However, I wanted to check if anybody has objections to a PR that implements the 1st option instead. Some custom clients that use XLSForm (online-only without resource-caching) would be helped by this.

KeynesYouDigIt commented 5 years ago

I dont see whats wrong with option 1 and can see how it would be much more beneficial. SHould we ammend the spec? Or should I just dive in and take this?