NetTalk Central

Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Web Server - Ask For Help / How to manipulate Camera PHOTO and display it
« Last post by rjolda on May 12, 2025, 05:31:49 AM »
Hi All,
NT 14.21, C11
I am having the users take a photo of a document (e.g. drivers license) on a black background.  Thanks to Charles Edmund and ImageEx, he gave me a routine to remove the background and crop the picture so that I have only the document.  It is all code.  When the user takes a photo, I want to be able to snag it either before display in the NT webcam picture or I could give them a button to "modify it" and display it in another NT webcam picture.  I can save the camera image to disk and manipulate the saved file BUT, I want to grab the image in memory and manipulate it.   The take photo and display it appear to be javascript functions in all.js.
I have not played with javascript so I don't have a clue as to how to go about doing this in Javascript in an elegant fashion.  Basically, ImageEx can import the photo from a Handle of the Global Memory BLock holding the image or from a URL ( or a file on disk). 
So, anyone have any ideas about how to snag this image in memory and send it to Clarion Source code and return it to image in memory for display in the NT webcam field? 
The javascript code seems to be:
                  case 1:  //Take Pic   
            $('#' + id).on('click',function(e){_this.takeSnapshot(e)});
            break;   
and
// Load canvas
$.fn.getCanvasImage = function(type) {
   if (!this[0].toDataURL) {return null;}
   if (type === undefined) {
      type = 'image/png';
   } else {
      type = type
         .replace(/^([a-z]+)$/gi, 'image/$1')
         .replace(/jpg/gi, 'jpeg');
   }
   return this[0].toDataURL(type);
};

Anyone with good javascript skills who can shed some insight and maybe some code to manipulate the image?
Thanks,
Ron

22
Web Server - Ask For Help / Re: How to set file upload filetypes
« Last post by Poul Jensen on May 12, 2025, 12:52:12 AM »
Thanks.

The field "Custom" did it.

/Poul
23
Hi,

Using this to download a file:
Code: [Select]
p_web.HeaderDetails.ContentDisposition =  'attachment; filename="'& CLIP(Loc:DownloadFileName) &'"'
Works fine first time, but if user later downloads same file, it is being served from internet browsers cache, and therefore not the latest version af the file.

How can I avoid this?

tia
/Poul
24
Web Server - Ask For Help / Re: How to set file upload filetypes
« Last post by Niels Larsen on May 12, 2025, 12:17:23 AM »
Maybe this is where you should look.
25
Web Server - Ask For Help / How to set file upload filetypes (SOLVED)
« Last post by Poul Jensen on May 11, 2025, 10:49:39 PM »
Hi,

Where do I set the filetypes for the filepicker used in the File Upload on a NT form?

tia
/Poul
26
Web Server - Ask For Help / Re: Webclient with certificat
« Last post by Jane on May 09, 2025, 04:48:09 PM »
ACK!
Sorry, Niels.  I thought I had edited those question-marks-that-should-be-dashes.

I pasted text from a PDF I did for a ClarionLive webinar some years back and the rogue question marks blossomed. 

Anyway, I hope you got it working.

Cheers,

Jane
27
Web Server - Ask For Help / Re: Webclient with certificat
« Last post by Niels Larsen on May 08, 2025, 11:32:59 PM »
You just made my Friday a great day.
You pointed me in the right direction.
When I couldn't get your commands to work (because I didn't realize that your - was converted to a ?) I found the description at https://www.ssl.com/how-to/export-certificates-private-key-from-pkcs12-file-with-openssl/
What I thought was impossible turned out to be very easy.

THANK YOU Jane!!!
28
Web Server - Ask For Help / Re: Webclient with certificat
« Last post by Jane on May 08, 2025, 08:44:44 PM »
Net demo web client is great for testing.
I don't think you'll be able to make it work with the PFX, though.
A PFX contains both the certificate (with its public key) and your secret private key.  And it's password-protected.

To split apart a PFX for use with NetTalk, use openssl (it's installed automatically with any of your netweb server projects).

When you use openssl, the first private key file you'll get will be password-protected. 
You can also run one more openssl command to produce an unencrypted private key file.

Code: [Select]
Openssl pkcs12 -in MyDomain.pfx -nocerts -out MyDomainEncrypted.key
Openssl rsa -in MyDomainEncrypted.key -out MyUnencryptedDomain.key
Openssl pkcs12 -in MyDomain.pfx -clcerts -nokeys -out MyDomain.crt
30
Web Server - Ask For Help / Re: Webclient with certificat
« Last post by Bruce on May 08, 2025, 06:03:43 PM »
Not sure if this is helpful - but see NetDemo, NetWebClient, "Secure HTTPS Options" tab, Client Certificate option.
If you can get it working from there, you'll be golden.

Cheers
Bruce
Pages: 1 2 [3] 4 5 ... 10