Forms: How to get a file path?

Das Goravani goravanis at
Fri Apr 29 19:53:13 UTC 2022

On JS Forms, if you just want to be able to select files, either by a picker or by drag and drop, and you just want the path of the file afterwards, I can’t think of a way to do that.

If you use drag onto like a list say, drag from the OS, it gives you an ident number, you can pass that to a client command readfile that has a completed method but that doesn’t give you path I don’t think, plus I couldn’t get it to work recently.

If you use the File forms object type, I don’t think that gives you path either, both of these read in the binary data, so I think they thought path was redundant.

But I’m trying to make an FTP feature. That requires that you be able to select files some way.

Just now it occurs to me that one could possible make their own file lists using FileOps on Forms. Unless I’m not thinking and FileOps doesn’t work in forms code for some reason. I know you can’t pop up the FileOps dialogs on top of forms, that’s out, I meant use the non-interfaced file ops commands that get directory listings. Display them and allow the user to drill down into and back out of like the Finder Open dialog on the Mac. Any Open dialog.. they allow you to navigate the file tree. So I suppose one could roll his own. That’s disappointing if that’s my only option. 

You would think that one could open a file and get the path on JS Forms natively easily. 

But I can’t think of a way and NOW I’ve gone over the objects and client commands. 

Any ideas?

More information about the omnisdev-en mailing list