Forms: How to select a file?

Philip Tulett philip.tulett at pdq-networks.com
Sat Apr 23 21:49:34 UTC 2022


Hi Das,Glad that you have made progress with the drag and drop.As you say, once you have drag files to the form, you have the binary content of the file in the memory variable,  but think about the... the memory variable has effectively transfered it to the Omnis Web app server. As you now have the binary content of the file, you do not need to save it to the servers HD in order to include it within the email that is going to be sent.A couple of  things to keep in mind:-If the user drags and drops a large file, it can take seconds (or longer) before the file is received/transferred to the server. The second think is holding many large files in memory can effect the Omnis Web server performance.  Just things to consider...Kind regards Phil Sent from my Galaxy
-------- Original message --------From: Das Goravani <goravanis at gmail.com> Date: 23/04/2022  18:51  (GMT+00:00) To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com> Subject: Re: Forms: How to select a file? > On Apr 23, 2022, at 1:22 PM, Philip Tulett <philip.tulett at pdq-networks.com> wrote:> > Hi Das,Are you talking about a remote form here?If so, the only way a Web app had access to the local machines files is via drag and drop (as you have already discovered). Think about where the email is going to be sent from, it from the Web app server, so files on the local machine would have to be uploaded to it first, via drag and drop. Kind regards Phil Sent from my GalaxyThanks Phillip. But...I didn’t understand the above much, sorry. I am talking remote form. Let me clarify and re ask:The email is sent from a remote form running on a client desktop/laptop computer. They have their own local files on their computer. They want to send them with an email.  For now I am using SMTPSend command.I have finally found drag and drop for remote forms in the documentation. For some reason yesterday I could not find it.Having found it I now realize how they do OS Files drop on remote forms.. the drop gives you an IDENT number which you use with a client command named readfile in which you pass in the name of a variable where it will put the read in text or base 64 bin. Good. So I have found how to do OS Files Drop on forms. So now I can program attaching files to an email on a remote form.BUT I wish there was a File Picker dialog that I could pop up over the form (good only on desktop/laptop computers).  I haven’t found that yet in the docs for remote forms. I’m glad I found out how to do drag and drop of file system files. The last part of the above message by Phillip has me bothered. I am thinking that the files are on the client machine, they drag them onto my form, which digests them, reads them, has the binary data in a mime list. I issue the SMTPSend command, which is executed on the server, but I’m thinking it will have no problem sending the files in the mime list since the mime list contains the binary data for the files. I DONT need to upload these files FIRST to the Web App Server machine.. as he says I would.. am I right?ThanksDas_____________________________________________________________Manage your list subscriptions at https://lists.omnis-dev.comStart a new message -> mailto:omnisdev-en at lists.omnis-dev.com 


More information about the omnisdev-en mailing list