Forms: How to get a file path?
goravanis at gmail.com
Sat Apr 30 17:12:06 UTC 2022
I had just been thinking about all you said and I came up with the same conclusion that you posted in your most recent post.
I have to bounce local files through the app server in order to upload them to an FTP server.
The only way I can think of to do this is to use the Forms File Control to read the files into binary, then plunk the file down onto the app servers drive by writing that binary into a file. I think WriteBinary can do that.. onto the App Servers Drive. So read binary, save binary on app server drive, then pass that new path to the FTP worker to upload to server.
It dawned on me that with Forms, when you create a text file report output, or a PDF, you save to the app servers drive, so then it’s no problem to FTP that to a server. So my actual concern is handled. There’s not so much of a need to upload client machine files to the FTP server though I can see that this could be needed. In that case they could use a typical FTP client app on their client machine to upload the files.. no need for that to go through the Form to the app server, to the FTP server.
So I think I fully get it all now.
One thing I don’t get is using memory. I am only familiar with paths to files. The FTP worker takes a path in and uploads it. I don’t know of it being able to take anything but a path. I am unfamiliar with using memory. Does a memory location substitute into a path form that the FTP worker can use? I’ve noticed various "memory" things.. others talking about it.. talking about Brainy Data doing PDF’s to memory.. what I don’t know is how they use that once it’s there in memory. Everything takes a path, how do you use memory stored things?
> On Apr 30, 2022, at 12:17 PM, Philip Tulett <philip.tulett at pdq-networks.com> wrote:
> Hi Das,
> The "Omnis FTP worker" allows transfer files to/from the "Omnis App Server" to a "Remote FTP Server", not to/from the "Omnis JS Client machine" (which maybe a PC, Mac, Phone, or Tablet).
> The "Omnis FileOps" allows transfer of files/file listings from the "Omnis App Server's Drives" to the " Omnis App memory varibles"
> So, combing the above, your application can read a file from the "Omnis App Server's Drives" and transfer it to a "Remote FTP Server".
> Now, if you want to transfer a file from an "Omnis JS Client machine", you have to add an extra step first, to upload the file from the "Omnis JS Client machine" to the "Omnis App Server's Drives" (or you could just store it in memory temporarily depending on size), then use the "Omnis FTP worker" to transfer the same file to a "Remote FTP Server".
> Yes, some Omnis samples and based around Desktop functionality, and some are based on JSClient functionality.
> It's about combining the functions together in order to get the required result.
> Kind regards
> -----Original Message-----
> From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Das Goravani
> Sent: 30 April 2022 17:10
> To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
> Subject: Re: Forms: How to get a file path?
> Omnis makes some of it’s sample libraries in Windows, not forms. This is true of IMAP, HTTP, FTP
> But I made an IMAP Client out of forms.
> I imagined that you could do HTTP and FTP from forms, but maybe I’m wrong.
> If you cannot select files off client machine and upload them, or off the app server and upload those, you’re screwed.
> I was today going to roll my own file picker with FileOps, maybe it’s a waste of time that I will rudely find out about when nothing works after I’m done picking my files to upload via FTP.
> Tell me how one finds out in forms, where his files are, and how he transfers them to another machine?
> Manage your list subscriptions at https://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en