41
Web Server - Ask For Help / Hide Webcam after photo is taken
« Last post by rjolda on May 21, 2025, 12:46:25 PM »Hi all,
Using NT14.21 , Clarion11.
I have a form with a Display Field - DisplayPhoto which displays the photo when the picture is taken.
On the same screen I have a TakePhoto button and a Webcam field which uses the environment Camera to take a photo (AON:ThisPicture) and display it in the DisplayPhoto field.
My TakePhoto Button has the embed:
p_web.SSV('PhotoDone', 'YES') ! we use this to display buttons - 1= we have taken picture -display ?Crop Photo button
this button is set to Reset the valued of AON:ThisPicture ( which is the field equate that stores the picture)
My Webcam field (equate AON:ThisPicture) has the following hide statement: p_web.GSV('PhotoDone') ='YES'
What I am finding is that the photo is taken and displays, the webcam display is gone and then the screen flickers and the webcam is back on display as if the webcam is set to ALWAYS display no matter what the programmer (like me) is trying to do.
Anyone with insights on this?
THanks,
Ron
Using NT14.21 , Clarion11.
I have a form with a Display Field - DisplayPhoto which displays the photo when the picture is taken.
On the same screen I have a TakePhoto button and a Webcam field which uses the environment Camera to take a photo (AON:ThisPicture) and display it in the DisplayPhoto field.
My TakePhoto Button has the embed:
p_web.SSV('PhotoDone', 'YES') ! we use this to display buttons - 1= we have taken picture -display ?Crop Photo button
this button is set to Reset the valued of AON:ThisPicture ( which is the field equate that stores the picture)
My Webcam field (equate AON:ThisPicture) has the following hide statement: p_web.GSV('PhotoDone') ='YES'
What I am finding is that the photo is taken and displays, the webcam display is gone and then the screen flickers and the webcam is back on display as if the webcam is set to ALWAYS display no matter what the programmer (like me) is trying to do.
Anyone with insights on this?
THanks,
Ron
42
Web Server - Ask For Help / Re: Api endpoint stream - how?
« Last post by Bruce on May 19, 2025, 07:20:40 PM »Can you define a bit more what you mean by "stream" a PDF file?
Tell us a bit more abut the context for this, and how "streaming" would be different from the normal "serving" ?
cheers
Bruce
Tell us a bit more abut the context for this, and how "streaming" would be different from the normal "serving" ?
cheers
Bruce
43
Web Server - Ask For Help / Api endpoint stream - how?
« Last post by Niels Larsen on May 18, 2025, 10:34:25 PM »Hi
I am developing an endpoint where I have to stream a pdf file (actually I have it as BASE64).
But I need some help to get going with the stream itself.
This is what I have from the associated Swagger:
Can one of you wise heads help me out?
Regards Niels
I am developing an endpoint where I have to stream a pdf file (actually I have it as BASE64).
But I need some help to get going with the stream itself.
This is what I have from the associated Swagger:
Code: [Select]
stream:
type: object
properties:
canRead:
type: boolean
canWrite:
type: boolean
canSeek:
type: boolean
canTimeout:
type: boolean
length:
format: int64
type: integer
position:
format: int64
type: integer
readTimeout:
format: int32
type: integer
writeTimeout:
format: int32
type: integer
Can one of you wise heads help me out?
Regards Niels
44
Web Server - Ask For Help / Re: Call a related table update form
« Last post by Poul Jensen on May 17, 2025, 07:25:08 AM »Hi Ron,
Thanks - that got me going.
Had an issue still getting an Record Not Found error when loading form B, until I added this code in the InitForm Routine:
/Poul
Thanks - that got me going.
Had an issue still getting an Record Not Found error when loading form B, until I added this code in the InitForm Routine:
Code: [Select]
p_web.SetValue('MCus:CUSTOMERNO',p_web.GSV('MCus:CUSTOMERNO'))
/Poul
45
Web Server - Ask For Help / Re: Call a related table update form
« Last post by rjolda on May 16, 2025, 10:18:17 AM »Hi Poul,
Are you going to use a Button to call Table B Update?
On the Button Code - "On CLick" - you can call the Update PROCEDURE for Table B here. You can set any Parameters to pass to Table B on the next line. Lastly the last check box "Include Action" you can check and set the action to Insert, Change as appropriate. That is where I would start.
Ron
Are you going to use a Button to call Table B Update?
On the Button Code - "On CLick" - you can call the Update PROCEDURE for Table B here. You can set any Parameters to pass to Table B on the next line. Lastly the last check box "Include Action" you can check and set the action to Insert, Change as appropriate. That is where I would start.
Ron
46
Web Server - Ask For Help / Call a related table update form (SOLVED)
« Last post by Poul Jensen on May 16, 2025, 03:11:42 AM »Hi,
From a button on the update form of table A, I would like to call the update form of a related table B.
On the button > Client-Side > Send new value to server, I get the record of the related table B (and verifies with debugview++ that it is the correct record) but I have no luck with calling the related update form.
Have tried various variants of code hacked from table B's browse, but without success. See code below:
What am I missing here?
tia
/Poul
From a button on the update form of table A, I would like to call the update form of a related table B.
On the button > Client-Side > Send new value to server, I get the record of the related table B (and verifies with debugview++ that it is the correct record) but I have no luck with calling the related update form.
Have tried various variants of code hacked from table B's browse, but without success. See code below:
Code: [Select]
DO OpenFiles
!Get record of table A
Access:MobSagH.ClearKey(MSagH:KeyGUID)
MSagH:GUID = p_web.GSV('MSagH:GUID')
NOMEMO(MobSagH)
IF Access:MobSagH.TryFetch(MSagH:KeyGUID)
!failed
ELSE
!Get record of table B
Access:MobCustomers.ClearKey(MCus:KeyGUID)
MCus:GUID = MSagH:KundeGUID
NOMEMO(MobCustomers)
IF Access:MobCustomers.TryFetch(MCus:KeyGUID)
!failed
ELSE
ds_outputdebugstring('RET KUNDEN - **OK** MSagH:KundeGUID: ' & MSagH:KundeGUID)
p_web.SSV('MCus:CUSTOMERNO', MCus:CUSTOMERNO)
!This doesn't work
UpdateMobCustomers(p_web,Net:Web:Popup) !Form Procedure
END
END
DO CloseFiles
What am I missing here?
tia
/Poul
47
Web Server - Ask For Help / Re: How to manipulate Camera PHOTO and display it
« Last post by rjolda on May 13, 2025, 12:42:11 PM »Hi,
That code looks like it will do just exactly what I need it to do.
Will check it out.
Thanks,
Ron
That code looks like it will do just exactly what I need it to do.
Will check it out.
Thanks,
Ron
48
Web Server - Ask For Help / Re: How to manipulate Camera PHOTO and display it
« Last post by osquiabro on May 13, 2025, 08:28:11 AM »I have a button that rotate a image with ImageEx
If ThumbImage.iImage.Load(p_web.GSV('Loc:Path'))
ThumbImage.iImage.Rotate(90)
Loc:GuidFoto = st.MakeGuid()
ThumbImage.iImage.SaveAs(st.PathOnly(p_web.GSV('Loc:Path'))&'\'& clip(Loc:GuidFoto)&'.'&st.ExtensionOnly(p_web.GSV('Loc:Path')) )
Loc:Path = st.PathOnly(p_web.GSV('Loc:Path'))&'\'& clip(Loc:GuidFoto)&'.'&st.ExtensionOnly(p_web.GSV('Loc:Path'))
p_web.ssv('Loc:Path',Loc:Path)
p_web.SetSessionValue('_save_Loc:Path',Loc:Path)
p_web.SaveFileToSession('Loc:Path','Mem:Foto')
End
loc:st_filename = '/uploads/'&clip(Loc:GuidFoto)&'.'&st.ExtensionOnly(p_web.GSV('Loc:Path'))
p_web.ssv('loc:st_filename',loc:st_filename)
If ThumbImage.iImage.Load(p_web.GSV('Loc:Path'))
ThumbImage.iImage.Rotate(90)
Loc:GuidFoto = st.MakeGuid()
ThumbImage.iImage.SaveAs(st.PathOnly(p_web.GSV('Loc:Path'))&'\'& clip(Loc:GuidFoto)&'.'&st.ExtensionOnly(p_web.GSV('Loc:Path')) )
Loc:Path = st.PathOnly(p_web.GSV('Loc:Path'))&'\'& clip(Loc:GuidFoto)&'.'&st.ExtensionOnly(p_web.GSV('Loc:Path'))
p_web.ssv('Loc:Path',Loc:Path)
p_web.SetSessionValue('_save_Loc:Path',Loc:Path)
p_web.SaveFileToSession('Loc:Path','Mem:Foto')
End
loc:st_filename = '/uploads/'&clip(Loc:GuidFoto)&'.'&st.ExtensionOnly(p_web.GSV('Loc:Path'))
p_web.ssv('loc:st_filename',loc:st_filename)
49
Web Server - Ask For Help / Re: Avoid downloaded file been served from browser cache
« Last post by Poul Jensen on May 13, 2025, 07:02:50 AM »try
p_web.HeaderDetails.ContentDisposition = 'attachment; filename="'& CLIP(Loc:DownloadFileName) &'"'
p_web.HeaderDetails.CacheControl = 'no-store, no-cache, must-revalidate, private,post-check=0, pre-check=0, max-age=0'
Thanks Bruce - this did it.
/Poul
50
Web Server - Ask For Help / Re: How to manipulate Camera PHOTO and display it
« Last post by Bruce on May 13, 2025, 06:48:18 AM »I think you're over thinking this.
The Take Photo button takes the photo, and sends it to the server.
So you can process it however you like on the server.
The browser really only needs to update the displayed picture after processing.
We can chat in the webinar if you need more ideas.
Cheers
Bruce
The Take Photo button takes the photo, and sends it to the server.
So you can process it however you like on the server.
The browser really only needs to update the displayed picture after processing.
We can chat in the webinar if you need more ideas.
Cheers
Bruce