Forms: How to select a file?

Das Goravani goravanis at
Sat Apr 23 22:13:15 UTC 2022

Dear Phillip,

Now I get you.. because you are talking about the automatic transfer of the binary data from the client machine to the web app server.. hadn’t thought about that.. didn’t know how they did it.. I know they do some things on the client, especially if you code for that, and some things are done on the server.. I know that as a vague concept but I don’t know specifics. 

And you breezed over one thing that is giving me grief.. you said "once you drag files to the form you have the binary data".. well no I do not yet have the binary data, because, you have to do it through the readfile client command, which has a "completed" type of method that is supposedly called when the readfile is complete.. in my case, it seems that method is not being called, I’m not getting my binary data therefore.

Readfile packs a binary field who’s name you pass it. That’s not happening, I’m not getting the binary data and it "seems" that the $readfilecompleted method is not being called. Or at least, you see I have a sound bell line in there, and I am not getting the beep.. you cannot do breakpoints in client side methods of this type. In that method I have very little code.. I just put the binary data into a list that I already have with the attachments in it. These are mail attachments in my case. But the bin data is not getting into that list.. telling me again that that method is not being called. But after I issue my client command I am getting flag true. As if that is going out well. This is not that hard, there’s not that much to it. Pretty straight forward. 

Any idea why a client command would give flag true and then not call it’s return method?


> On Apr 23, 2022, at 5:49 PM, Philip Tulett <philip.tulett at> wrote:
> 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> Date: 23/04/2022  18:51  (GMT+00:00) To: OmnisDev List - English <omnisdev-en at> Subject: Re: Forms: How to select a file? > On Apr 23, 2022, at 1:22 PM, Philip Tulett <philip.tulett at> 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 
> _____________________________________________________________
> Manage your list subscriptions at
> Start a new message -> mailto:omnisdev-en at 

More information about the omnisdev-en mailing list