-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow uploads of images via ODK #766
Conversation
@dodumosu rebase |
2ad759c
to
b1e19b8
Compare
@takinbo rebased |
b1e19b8
to
50afe6c
Compare
131881d
to
9e6f3b2
Compare
01989c7
to
35b3ee0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments inline. Also this PR needs a rebase.
35b3ee0
to
a8cde9a
Compare
2641172
to
d2a4679
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting this error when I try to spin a container:
worker_1 | Traceback (most recent call last):
worker_1 | File "/app/manage.py", line 15, in <module>
worker_1 | from apollo.core import db
worker_1 | File "/app/apollo/__init__.py", line 15, in <module>
worker_1 | from apollo import assets, models, services
worker_1 | File "/app/apollo/models.py", line 14, in <module>
worker_1 | from apollo.submissions.models import ( # noqa
worker_1 | File "/app/apollo/submissions/models.py", line 3, in <module>
worker_1 | from depot.fields.specialized.image import UploadedImageWithThumb
worker_1 | File "/usr/local/lib/python3.6/site-packages/depot/fields/specialized/image.py", line 5, in <module>
worker_1 | from PIL import Image
worker_1 | ModuleNotFoundError: No module named 'PIL'
to dependencies also upgrade requests because boto3 requires a higher minimum urllib3 version
this commit adds several configuration variables, viz: - `ATTACHMENTS_USE_S3` - `AWS_ACCESS_KEY_ID` - `AWS_SECRET_ACCESS_KEY` - `AWS_DEFAULT_REGION` - `AWS_DEFAULT_BUCKET` - `AWS_IMAGES_REGION` - `AWS_IMAGES_BUCKET` - `AWS_ENDPINT_URL` - `DEFAULT_STORAGE_PATH` - `IMAGES_STORAGE_PATH`
this commit adds several changes: - adds the field `allow_attachments` to the form model - adds toggling of the `allow_attachments` field in the form properties - adds the `image` field type - adds image attachment model class - adds support for the `location` and `image` field types to the form builder - adds support for importing and exporting forms with the `image` field type
this commit disables rendering of image and location fields until a decision is reached on how they will be rendered
this commit adds the following: - a URL endpoint to generate a QR code for configuring ODK Collect, optionally for a specific participant - processing for image attachments using ODK
41c4c4b
to
693b017
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
this pull request allows Apollo manage participant-submitted images via ODK as responses to questions. it also allows for the configuration of ODK Collect via a QR Code, either for the entire system (in which case no credentials are applied), or for a specific participant.
Image uploads can be configured locally or for Amazon S3. Relevant settings are:
ATTACHMENTS_USE_S3
(boolean flag, set to true if uploads should go to S3)AWS_ACCESS_KEY_ID
: required if the above is trueAWS_SECRET_ACCESS_KEY
: required if the above is trueAWS_DEFAULT_REGION
: optionalAWS_DEFAULT_BUCKET
: optionalAWS_IMAGES_REGION
: specifically for images. defaults toAWS_DEFAULT_REGION
AWS_IMAGES_BUCKET
: specifically for images: defaults toAWS_DEFAULT_BUCKET
AWS_ENDPOINT_URL
DEFAULT_STORAGE_PATH
: defaults to the configured path for uploadsIMAGES_STORAGE_PATH
: defaults to a subfolder namedimages
inDEFAULT_STORAGE_PATH