Julian
Julian

Reputation: 72

How to activate "Scan" image on upload on mobile browser on file uploads?

Situation

My application allows the upload of invoices as image files via a simple_form.file_field.

When uploading inside the app via a mobile browser like Google Chrome the camera will give you the option to take an image (Option A - Mobile browser).

If I take a photo normally via the camera app (in my case the standard camera app of Samsung-S10) recognizes the document on the image and allows me to "scan" the document by clicking the appropriate button (Option B - Camera image)

Problem

Option A doesnt offer to scan like Option B!

Is there some kind of way to tell the mobile camera on file upload to activate the document scanning feature? Is there an option to pass to the file_field in Rails to activate this?

Usability is pretty bad if you have to extra make the picture of the document to allow scanning it and thereafter use your mobile browser to extra upload the just created image instead of directly scanning it inside the web app directly on file upload.

The code

...

    <div class="form-group">
      <%= f.label :physical_copy, required: true %>
      <% if @in_invoice.physical_copy.attached? %>
        <%= link_to @in_invoice.physical_copy.filename, rails_blob_path(@in_invoice.physical_copy, disposition: 'attachment') %>
      <% end %>
      <%= f.file_field :physical_copy, class: 'form-control col-sm-8' %>
    </div>

...

Upvotes: 0

Views: 35

Answers (0)

Related Questions