Allow upload from camera on website via smart phone browser

Hello,

It would be cool when adding a trap record to be able to capture an image from the camera. This can be done (tested in firefox and chrome) by adding the accept attribute to the file input. When done, it should give an option between selecting a file or using the camera. (Don’t have an Android or Apple smartphone, so can’t use the app)

<input class="form-control form-file" type="file" id="edit-field-images-und-0-upload--2" name="files[field_images_und_0]" size="22" accept="image/png,image/gif,image/jpeg">

It could also be helpful to be able to upload multiple files at once (with the multiple attribute on the input)

Thanks for this info. The developers say that it should be a quick fix - we’ll look into it!

1 Like

Kia ora!

Thanks for your suggestion - we’ve actioned it and you can now upload from photos or use your camera using the accept attribute.

At this stage adding multiple is a bit more involved, but it’s on our list of things to do in future :slight_smile:

Ngā mihi,
Sarah
The Trap.NZ Team

1 Like

Kia ora Sarah and the team.

Ah cool. I can see they have added the accept attribute. Have given it a test on browserstack and the extensions which they used don’t work on firefox. Could they add or use the mime types instead? Mimes (eg https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file) work on all browsers (tested FF, Chrome [on Android], FF [on Linux] and Safari).

accept="image/png,image/gif,image/jpeg"

or

accept="image/png,image/gif,image/jpeg,.png,.gif,.jpg,.jpeg"

Ngā mihi,
Jack

Kia ora Jack,

Thanks for the heads up! I’ve passed this on to our tech team :slight_smile:

Ngā mihi,
Sarah

Hi again Jack,

Just checking in to let you know that the dev team have implemented your suggestion :slight_smile:

Ngā mihi,
Sarah
(she/her)

2 Likes

Awesome. Thanks Sarah. Works well.

1 Like