-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Add-on] Photo field to capture image through webcam #4
Comments
Hmmm not a bad idea @srigurubyo . It should be pretty easy to create a custom field type that uses the capture attribute. Or better yet - I'm wondering, wouldn't it work with the existing // using the fluent syntax
CRUD::field('profile_image')->type('upload')->attributes(['capture' => 'user']);
// or using the array syntax
$this->crud->addField([
'name' => 'profile_image',
'label' => 'Profile Image',
'type' => 'upload',
'upload' => true,
'attributes' => ['capture' => 'user'],
'disk' => 'uploads',
]); Cheers! |
Thanks for your response @tabacitu. I tried your above code but getting only the 'Browse' button based file upload control and webcam is not triggered. Since I am not very familiar with the php coding, if you can provide some inputs I am willing to tweak the existing upload to build a new field type. Thanks in advance for you help here! |
Well then I imagine it only works on mobile devices, not on desktop. Personally I don't know of a way to easily do this on desktop - last time I needed this, quite a few years ago, it was done with Flash, but I imagine there are more modern ways to do it nowadays. No idea what ways though. I think it'd be a cool feature to have, so I'm going to move this to our add-ons repo, so the talk can evolve and maybe result in an add-on for Backpack. I don't see it as an important feature, since Backpack has been around for 5+ years and it's the first I hear this feature request, but I agree it'd be cool to have. Sorry I can't be of more help @srigurubyo . Let us know if your research results in something that'll be useful to other Backpack developers. Cheers! |
Your workaround works for MOBILE phones but not for laptops. I am trying to come up with a custom field namely 'capture' to accomplish this. I shall keep you posted, if I succeed. |
Feature Request
We would like to capture photo through webcam to be uploaded to DB
What's the feature you think Backpack should have?
Additional field to take photo using webcam similar to filed image option.
Have you already implemented a prototype solution, for your own project?
No
Do you see this as a core feature or an add-on?
Good to have
The text was updated successfully, but these errors were encountered: