Maybe too simple for what you need to do, but have a look at the "execute on 
server" property for project methods.

Create a method that is executed on server. It gets as $1 the id of the 
document you want to display on the client side. The method does everything to 
fetch the document from the directory on the server etc. and sends it to the 
client in $0.

Keep in mind that this method (executed on server) behaves similar to a trigger 
method: you are read/write for all tables and you should have your own On Err 
Call method.

Best,

Olivier

|||||| https://flury-software.ch/

-----Ursprüngliche Nachricht-----
Von: 4D_Tech <[email protected]> Im Auftrag von Chris Belanger via 
4D_Tech
Gesendet: Freitag, 24. April 2020 10:57
An: 4D iNUG Technical <[email protected]>
Cc: Chris Belanger <[email protected]>
Betreff: 4D v18 — Need methodology to 

I have a methodology of allowing clients to transfer documents that are 
thereafter stored by 4D Server in a ‘LIBRARY’ of system documents it maintains 
automatically. [these are not stored in the DB, but in a managed folder on 
disk.]

I do this by:
• Loading a system document into a BLOB, then using BASE64 ENCODE to store it 
in a TEXT field;    —— thanks Peter Bozek for the tip on BASE64 ENCODE / DECODE!
• the TRIGGER method (running on 4D server) unpacks it and creates / updates 
the files in its ‘Library’ directory on disk.

Now I need to be able to retrieve the contents of these files for 4D [Client].
I can display the files in a Web Area —> Thanks to Keith for the tip.

** But I am looking for a simple way to get 4D Server to ’send’ the data to the 
CLIENT (4D) upon request.

In the past [since v12), I made elaborate ‘communicator’ stored routines to 
fudge it, but I have a feeling that now there are better ways to do it.

I wish it was simple as:
Request_Document ( $LibraryEntity ) —> Document Contents   [retrieved from the 
library of user’s documents stored by 4D Server on disk]

Any suggestions? Do I have to use Workers, or Stored Procedures, or something?

Thank you, guys & gals,

Chris Belanger
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to