Adding code for widget to attach any file to ODK Collect form (not only images)

Hi team,

I have a need to attach other file types to an ODK Collect survey, and want
to attempt to contribute the necessary code for this. In a 2013 thread
https://groups.google.com/d/msg/opendatakit/6WbBAwkWpI4/NZyWsF1XZXEJ
Mitch said:

··· ------ We don't have a widget for this, but it would be quite easy for a Java developer to copy the ImageWidget into a 'FilePickerWidget' and modify the Choose Image functionality to instead use the 3rd party 'OI File Manager' as a file picker (picking and making a copy of the file in the ODK Collect instance folder). -------

Given that that is an old thread:

  1. Has this functionality been provided in the meantime?
  2. If not, would you still consider this the best way to go about it?
  3. What would be needed to add XLSForm support for this once implemented?

Thanks and regards,
Andrew Cawood

Hi Andrew,

  1. Not that I know of.

  2. Yeah, seems reasonable to me. The send code would also have to try
    to guess at MIME types so the server would have a hint as to what to
    do with the file.

  3. Yup. And it should be pretty easy. Maybe add a binary/file data
    type? Might also have to add some code in Aggregate to deal with the
    MIME type.

Looking forward to the code contribution!

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Sat, Sep 12, 2015 at 9:17 AM, Andrew acawood777@gmail.com wrote:

Hi team,

I have a need to attach other file types to an ODK Collect survey, and want
to attempt to contribute the necessary code for this. In a 2013 thread Mitch
said:

We don't have a widget for this, but it would be quite easy for a Java
developer to copy the ImageWidget into a 'FilePickerWidget' and modify the
Choose Image functionality to instead use the 3rd party 'OI File Manager' as
a file picker (picking and making a copy of the file in the ODK Collect
instance folder).

Given that that is an old thread:

  1. Has this functionality been provided in the meantime?
  2. If not, would you still consider this the best way to go about it?
  3. What would be needed to add XLSForm support for this once implemented?

Thanks and regards,
Andrew Cawood

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re pyxform, see https://github.com/XLSForm/pyxform/issues/33.

··· On Sunday, September 13, 2015 at 3:38:57 PM UTC-6, Yaw Anokwa wrote: > > Hi Andrew, > > 1. Not that I know of. > > 2. Yeah, seems reasonable to me. The send code would also have to try > to guess at MIME types so the server would have a hint as to what to > do with the file. > > 3. Yup. And it should be pretty easy. Maybe add a binary/file data > type? Might also have to add some code in Aggregate to deal with the > MIME type. > > Looking forward to the code contribution! > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > > > On Sat, Sep 12, 2015 at 9:17 AM, Andrew <acawo...@gmail.com > wrote: > > Hi team, > > > > I have a need to attach other file types to an ODK Collect survey, and > want > > to attempt to contribute the necessary code for this. In a 2013 thread > Mitch > > said: > > ------ > > We don't have a widget for this, but it would be quite easy for a Java > > developer to copy the ImageWidget into a 'FilePickerWidget' and modify > the > > Choose Image functionality to instead use the 3rd party 'OI File > Manager' as > > a file picker (picking and making a copy of the file in the ODK Collect > > instance folder). > > ------- > > > > Given that that is an old thread: > > 1) Has this functionality been provided in the meantime? > > 2) If not, would you still consider this the best way to go about it? > > 3) What would be needed to add XLSForm support for this once > implemented? > > > > Thanks and regards, > > Andrew Cawood > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "ODK Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to opendatakit-developers+unsubscribe@googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. >