Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

[Feature Request] Send/Select an image to scan it #252

Open
rlazom opened this issue Jun 3, 2020 · 0 comments
Open

[Feature Request] Send/Select an image to scan it #252

rlazom opened this issue Jun 3, 2020 · 0 comments
Labels
Feature Feature Request

Comments

@rlazom
Copy link

rlazom commented Jun 3, 2020

Basically what I mean is, could be a good alternative for the web, instead of reading from the webcam, send an image (file or image data) and just decode it, like the current code (but instead of scan from the camera, scan from a selected image file).

So I propose add a new function "selectFile" or something like that.
You can get the file (on the web platform) with this code:

    Future<File> uploadElement() async {
      final FileUploadInputElement input = FileUploadInputElement();
      input..accept = 'image/*';
      input.click();
      await input.onChange.first;
      if (input.files.isEmpty) return null;
      return input.files[0];
    }

With this file you can draw the image from an attribute (I think is data).

Other plugin alternatives suck, and the one who can do this feature, receive a file path, and you can not get the path of a selected file on the web platform...

So that's it,
Thanks in advance

@rlazom rlazom added the Feature Feature Request label Jun 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant