Hi guys,
is it possible to use a webcam to take a picture/snapshot when pressing a button and save it to database?
i would like to use a form to make a archive of labels of concrete samples. I will have to take maybe nearly hundred pictures a day.
of course i could use another software to take the picture and then select the picture in file explorer and upload it. But I try to eliminate as most clicks as possible…
any ideas?
It would take a lot of custom code and I have no idea how you would upload it to the media library with the upload field unless is was saved to the drive and selected for upload. See this: https://www.google.com/search?client=firefox-b-1-d&q=programmatic+webcam+snapshot
Thx for your answer!
it neednt be saved to media library.
i would prefer to save it to a mysql database or in a custom folder.
You won't be able to store it in the database using Formidable. Formidable only stored field values as text. To store an actual image in the database, you would have to store it to a blob database field. You can't change the metadata schema both WordPress and Formidable use.
As for uploading it to a custom folder and bypassing the media library, you would have to create you're own code to do this. I don't think you can use Formidable's upload field. Even though you can customize the directory, it still requires an attachment id from the media library. The attachment id links the image to the form entry.
What you want to do is completely custom and not available out of the box.
Is this a geotechnical engineering need? I've built some applications that can produce a sample ID and apply that to a QR code. Then you can scan the QR code and go to that sample entry and then from within the entry upload multiple photos that are then tied to that entry. Is that sort of what you are going for?
There was a webcam plugin feature that worked with the file upload field in FF, possibly created by Vinay Rai or Ranjeet Singh of MrPhpGuru.
I've noticed the specific link to this plugin is no longer available at the MrPhpGuru website.
I'm going to try to reach out to him via email, and will post an update if he replies.
I brushed out part of the image illustration for privacy.
Are we allowed to post Code here?
Sure, though you should use something like paste2.org so that you can format the code clearly. The code formatting with his forum leaves a lot to be desired.
Webcam javascript as a png for Header Section of the insert Headers and Footers plugin
Please login or Register to submit your answer