NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Bruce

Pages: 1 2 [3] 4 5 ... 746
31
Web Server - Ask For Help / Re: Api endpoint stream - how?
« 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

32
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

33
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'


34
first you need to determine if it's coming from the local client cache, or the server cache.
(Both the browser, like Chrome or Edge) and the NetTalk server can cache files.

There are headers you can set when serving the file to indicate it's uncacheable. (You can google for that if you like, or look in netweb.clw.)
Alternatively you can alter the URL - by adding a random parameter. For example;

capesoft.com\somefile.saf?r=123
is different from
capesoft.com\somefile.saf?r=321

So simple by adding a parameter (which the server happily ignores) with a random value, the client won't get it from cache.
Obviously though it depends on how they are seeing the URL in the first place to download the file.

Cheers
Bruce

36
Web Server - Ask For Help / Re: Webclient with certificat
« 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

37
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« on: May 04, 2025, 09:50:26 PM »
>> But the customer wants it like this:
http://127.0.0.1/WasteInvoice/InvoiceOverview/account/{accountId}/customer/{customerId}

Have you told him how much extra that pattern will cost? I find that putting a price on it lets you determine how much they "actually want it".

>> Does that make sense?

yes.
To do this though you will need to parse the WholeURL yourself, likely in webHandler, setting the values as you interpret them (ie with a call to SetValue).
It's not terribly hard to do, but obviously is a custom approach to both parsing the values, and then redirecting the request to the correct API.

For example, in this URL I presume WasteInvoice is the name of the NetWebService, and InvoiceOverview is the name of the NetWebSericeMethod.
You *may* find it parses that sufficiently to get the call into the NetWebServiceMethod procedure, or you may need to parse it in webHandler.
Once you are in the method, you can then parse the URL further to find the account and customer ID. That's pretty easy to do with StringTheory etc.

Cheers
Bruce

38
Web Server - Ask For Help / Re: Refresh NWB Header
« on: April 25, 2025, 10:46:32 PM »
ahhh - so when you said "the browse header" you meant in a routine that you happened to name "header".
A small detail, that probably matters with regard to the answers.

The item you are updating in this header, is it specific to this user, or common across all users using the server? It seems like it's a value unique to this user?

Your best option is to make a small example app showing what it is you want to do, and I can look at that and suggest something from there...

Cheers
Bruce

39
Web Server - Ask For Help / Re: Refresh NWB Header
« on: April 23, 2025, 07:18:51 PM »
define what you mean by "browse header" ?

40
Web Server - Ask For Help / Re: Pass parameter in servercall?
« on: April 16, 2025, 06:45:26 PM »
p_web.StoreValue('a')
Is the best way to set a session value to a value, because then if the value doesn't exist (as a parameter) it does not overwrite the session value.
I expect you are just overwriting your session value to blank when the value does not exist.

41
just out of curiosity - does a double tap on the phone open them?
Does the first tap open the tooltip?

42
Web Server - Ask For Help / Re: Wrong encoding of text on maps
« on: March 24, 2025, 11:43:24 PM »
thanks - fixed for 14.30

43
Web Server - Ask For Help / Re: Button on header
« on: March 24, 2025, 10:09:05 PM »
not really. I had no success making this work.

44
depends if the page is in popup mode or page mode.
You can't set a parameter easily from the Map side, since it's called directly from javascript, but you might be able to set a parameter on the browse side. And then check for that parameter (GetValue) in the form.

45
>> the approach of having a second update form on the update form for the point record, is that a good approach?

no.

A better approach, one that will work, is to call the form you want to call. In the example you sent me that would be UpdateUser, in your real app I expect it's UpdateJob, or whatever.

So now the issue is getting the correct record loaded in that table. I'll refer to the example you sent - the map is plotting the accidents, but you want to UpdateUser. So in UpdateUser, in the InitForm routine you need to prime the GUID value of the user to edit.

At this point all you have is the sesison value for the Accident. So the code goes something like this;

  Access:Accident.Open()
  Access:Accident.UseFile()
  Acc:Guid = p_web.GSV('Acc:Guid')
  Access:Accident.TryFetch(Acc:GuidKey)
  User:Guid = Acc:UserGUID
  Access:Accident.Close() 
  p_web.SetValue('Use:Guid',Use:Guid)
  p_web.SetSessionValue('Use:Guid',Use:Guid) 

This loads the Use:Guid into the Value, and SessionValue queues, and from there the form can take over.

Cheers
Bruce


Pages: 1 2 [3] 4 5 ... 746