Signature and Imager file destination

// Expert user has replied.
R Robert Galvin 3 years 5 months ago
0 7 0

So for signature capture, if I do not specify a full path for a file name as the destination, where does the file go? Do I always have to specify file://\fullpath\filename.bmp? i.e.: signatureCapture.destination = 'sig.bmp';     Does it go in the same folder as the calling .html file? or the Neon app folder? Same question for imager. I want to make my app portable and relative so that it can run in any folder tree it ends up in (i.e. so it can support Winmo and Android.

Please Register or Login to post a reply

7 Replies

J Juan-Antonio Martinez

Grazie, Pietro! So, you don't prepend "file://" , I see... Now this works, 1000 grazie! It's confusing, on Signature capture this "file://" is required. This is my (now working) code:

 function fnCaptureSave()  {  var d = new Date();  var nombre = "\\Application\\Picture_" + d.getTime()+ ".jpg";

  imager.destination = nombre;   imager.capture();        alert("Picture saved as "+nombre);   } In my case, I use the number of seconds since THE epoch to make sure pics have different names.

E Efkan YILMAZ

The confusion over whether or not to use file:// has been resolved in the next release of RhoElements, you should be able to use either. Thanks.

G Geoffrey Day

I should add to my original reply, in order to delete a file you can use the ODAX Delete() method. Details are in the help file under ActiveX Objects, Offline Data Access, Delete. Do this before you start signature or image capture to avoid file overwrite problems.

J Juan-Antonio Martinez

What should actually imager.destination have? I tried file://\\Application,  file://\\Application\\picture,   file://\\Application\\picture.bmp to no avail, imager keeps on creating IMG file (no extension actually!!) on root folder and that's all it does. thanks!

P Pietro Francesco Maggi

I've just used
imager.destination = '/Temp/camera_' + g_nImageCounter + '.jpg'; where
g_nImageCounter is my counter variable that I increment for every shot. It works for me on the ES400 with the latest RhoElements. ~Pietro

G Geoffrey Day

We recommend the full path and filename like  file://\fullpath\filename.bmp as in your example. If you don't specify a path then the destination is platform dependent. On Windows platforms all paths start at the root of the device; on Android they start at the root of the SD card (i.e. you shouldn't specify /mnt/sdcard).  This applies to all path and filenames specified with the file:// protocol, including signature capture and imager.

R Robert Galvin

for the imager.destination it looks like it will not overwrite the file if it exists. imager.capture() - looks like it first creates a IMG file in the root and then moves to the imager.destination path. If the file exists it won't overwrite it. So does this mean you always have to use the transfer object for local files? signatureCapture.capture() - looks like it will always overwrite the file. Can you confirm the recommended approach and sequence of events for handling local files for both image capture and signature capture? Thanks

CONTACT
Can’t find what you’re looking for?