On Jul 2, 9:10 pm, Nigel Tao <[email protected]> wrote: > On Jul 3, 4:21 am, yhe <[email protected]> wrote: > > > In 'OpenFilesCallback': > > * if a directory file is selected then all of the files in the > > directory(s) will become > > candidates for selection after being 'filtered' for passing to the > > 'openFiles' method; > > * if 'singleFile' attribute is true as set in 'OpenFileOptions' > > class the the first > > 'filtered' file in the directory is passed; > > > In 'File': > > * needs a 'URL' string attribute; > > There's a tricky case with recursive directory traversal. Suppose that > my workplace puts everybody's home directory under /home on a network > file system. If a recursive filepicker API is implemented > synchronously, and I accidentally select the "/home" dir, then you > might lock up the whole browser for literally hours as it traverses > thousands of peoples' home dirs. > > As for a File's URL attribute, we've tried to avoid exposing a user's > username (e.g. the "joe" in "/home/joe/Photos/foo.jpeg") if we can > help it. If you really need a URL for a File's contents, there's a > workaround where you can capture the File's Blob to a ResourceStore, > which gives you a URL. Just make sure to remove the capture, when > you're done.
Thanks for the thoughtful response. I still think the recursion is useful. jtol (Just Thinking Out Loud): I suppose all OS GUI widgets don't allow for the pick to only show the relative directory? Of course, such a limitation flies in the face of a user's rights to potentially traverse upward anyway. But if the OS widgets could show only the relative directory then upward movement could be controlled by purposeful selection of "../" ala Java directory widgets to presume no accidental choice? Alternatively, could there be a configuration attribute that MAXes the Files[] list allocation? Typical users wouldn't exercise the option max of something in the 32-128 range. Maybe this could even be controlled from the application server as to whether the option is user visible? Your URL suggestion works. Thanks.
