Accessing images uploaded by the CommCare Android client

Hi.

I'm trying to find an appropriate way, via the CCHQ HTTP API, to download
images uploaded from the mobile app. I see from the UserVoice/Wiki/forum
that there have been previous discussions about this, but I remain
uncertain about the currently available/recommended methods to do this.

Via the case list->form details, I see a URL to the image structured as:
https://www.commcarehq.org/a//reports/form_data/<form-id ???>
/download-attachment/?attachment=.jpg

In our app, we're actually updating the case to include the image, and the
relative path to the image is being stored as case property as well (ie.
.jpg).

So, I guess two questions:

  1. Are/can images be associated with a case and, if so, how can these be
    downloaded programmatically?
  2. If images are only associated with forms, is the URL shown above
    appropriate to use for downloading the image?

Thanks, Ray

··· -- Ray Brunsting, CTO, Tula Foundation / tula.org

Hi Ray,

Good questions.

  1. This is not currently possible, but we hope to expose a way associate
    multimedia with cases in the future.

  2. That URL can be used, but instead, you can download all of the
    multimedia submissions associated with a form from the "Download
    Multimedia" link on the export page. Generally, this link can be found at
    /a//reports/form_data/download/media/?app_id=<app_
    id>&xmlns=<app_xmlns>&startdate=&hq_
    filters=true&enddate=&filterSet=false and could be used
    programmatically similarly to how you propose using the individual links.

Thanks,

··· -- Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139
web: http://www.dimagi.com/

On Wed, Mar 25, 2015 at 1:30 PM, Ray Brunsting ray@tula.org wrote:

Hi.

I'm trying to find an appropriate way, via the CCHQ HTTP API, to download
images uploaded from the mobile app. I see from the UserVoice/Wiki/forum
that there have been previous discussions about this, but I remain
uncertain about the currently available/recommended methods to do this.

Via the case list->form details, I see a URL to the image structured as:
https://www.commcarehq.org/a//reports/form_data/<form-id ???>
/download-attachment/?attachment=.jpg

In our app, we're actually updating the case to include the image, and the
relative path to the image is being stored as case property as well (ie.
.jpg).

So, I guess two questions:

  1. Are/can images be associated with a case and, if so, how can these
    be downloaded programmatically?
  2. If images are only associated with forms, is the URL shown above
    appropriate to use for downloading the image?

Thanks, Ray

Ray Brunsting, CTO, Tula Foundation / tula.org

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

Hi Nate Haduch,

        I am unable to access the images in either of the link given.

Has Commcare streamlined a way to access the images associated with the
form ?

Thanks,
Sadiq.

··· On Saturday, March 28, 2015 at 2:24:38 AM UTC+5:30, Nate Haduch wrote: > > Hi Ray, > > Good questions. > > 1. This is not currently possible, but we hope to expose a way associate > multimedia with cases in the future. > > 2. That URL can be used, but instead, you can download all of the > multimedia submissions associated with a form from the "Download > Multimedia" link on the export page. Generally, this link can be found at > /a//reports/form_data/download/media/?app_id= id>&xmlns=&startdate=&hq_ > filters=true&enddate=&filterSet=false and could be used > programmatically similarly to how you propose using the individual links. > > Thanks, > > > -- > Nate Haduch > > Technical Support Analyst > Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139 > web: http://www.dimagi.com/ > > > > > On Wed, Mar 25, 2015 at 1:30 PM, Ray Brunsting <r...@tula.org > wrote: > >> Hi. >> >> I'm trying to find an appropriate way, via the CCHQ HTTP API, to download >> images uploaded from the mobile app. I see from the UserVoice/Wiki/forum >> that there have been previous discussions about this, but I remain >> uncertain about the currently available/recommended methods to do this. >> >> Via the case list->form details, I see a URL to the image structured as: >> https://www.commcarehq.org/a/**/reports/form_data/*> ???>*/download-attachment/?attachment=**.jpg >> >> In our app, we're actually updating the case to include the image, and >> the relative path to the image is being stored as case property as well >> (ie. **.jpg). >> >> So, I guess two questions: >> >> 1. Are/can images be associated with a case and, if so, how can these >> be downloaded programmatically? >> 2. If images are only associated with forms, is the URL shown above >> appropriate to use for downloading the image? >> >> Thanks, Ray >> -- >> Ray Brunsting, CTO, Tula Foundation / tula.org >> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > >

Hello,

I believe this has been incorporated into the form data export
functionality - please see the bottom of this page
https://confluence.dimagi.com/display/commcarepublic/Form+Data+Export.

Best,
Will

··· On Sat, Nov 28, 2015 at 12:00 PM, mohd sadiq wrote:

Hi Nate Haduch,

        I am unable to access the images in either of the link given.

Has Commcare streamlined a way to access the images associated with the
form ?

Thanks,
Sadiq.

On Saturday, March 28, 2015 at 2:24:38 AM UTC+5:30, Nate Haduch wrote:

Hi Ray,

Good questions.

  1. This is not currently possible, but we hope to expose a way associate
    multimedia with cases in the future.

  2. That URL can be used, but instead, you can download all of the
    multimedia submissions associated with a form from the "Download
    Multimedia" link on the export page. Generally, this link can be found at
    /a//reports/form_data/download/media/?app_id=<app_
    id>&xmlns=<app_xmlns>&startdate=&hq_
    filters=true&enddate=&filterSet=false and could be used
    programmatically similarly to how you propose using the individual links.

Thanks,

--
Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139
web: http://www.dimagi.com/

On Wed, Mar 25, 2015 at 1:30 PM, Ray Brunsting r...@tula.org wrote:

Hi.

I'm trying to find an appropriate way, via the CCHQ HTTP API, to
download images uploaded from the mobile app. I see from the
UserVoice/Wiki/forum that there have been previous discussions about this,
but I remain uncertain about the currently available/recommended methods to
do this.

Via the case list->form details, I see a URL to the image structured as:
https://www.commcarehq.org/a//reports/form_data/<form-id
???>
/download-attachment/?attachment=.jpg

In our app, we're actually updating the case to include the image, and
the relative path to the image is being stored as case property as well
(ie. .jpg).

So, I guess two questions:

  1. Are/can images be associated with a case and, if so, how can
    these be downloaded programmatically?
  2. If images are only associated with forms, is the URL shown above
    appropriate to use for downloading the image?

Thanks, Ray

Ray Brunsting, CTO, Tula Foundation / tula.org

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

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