My web app needs to browse the local file system for file names and
directories to build lists for processing with a commercial application.
I realize this is a no no for web client apps due to security concerns.
One approach is to write signed java applets to integrate this
functionality. While this would work, I was curious if it is possible to
make a signed piece of ruby code to do the same thing?
The code could be RJS based and signed. Is there any way to make this
happen and keep out of the java world? Is jruby a possibility?
Rails has nothing to do with this (being the server and all, no
interaction
with client computers). Java applets work because they are run on the
client. Javascript is not allowed to do much in this space, last I
checked,
so you’re basically stuck with a Flash or Java app embedded in the page
that
can post back to the server.
I do know that Flash 8+ has an upload window but I’m not sure if it
can scour the drive to list all the files. You may want to check that
out. If not, then the java applet is the answer for you.
You can do anything you’d from the command line and pass values back and
forth.
You can write your own classes and put the file in the RAILS_ROOT/lib
dir.
I am using it to do some file format conversions. To see how shell is
used you can look into the doc_convert library to see how shell is
used. That’s what I did. http://raa.ruby-lang.org/project/doc_convert/
My web app needs to browse the local file system for file names and
directories to build lists for processing with a commercial application.
I realize this is a no no for web client apps due to security concerns.
One approach is to write signed java applets to integrate this
functionality. While this would work, I was curious if it is possible to
make a signed piece of ruby code to do the same thing?
The code could be RJS based and signed. Is there any way to make this
happen and keep out of the java world? Is jruby a possibility?
Thanks any help is greatly appreciated,
Rick
When you said your web app needs to browse the local file system, does
it means the file system of the web server or does it means the file
system of the people browsing/access your web page? If it is the
former, it is simple using the File Class. If it is the later, I am not
sure. If it is file upload, you can use the file_field_tag.
On the other hand, if you can run application on the client end, then
you can build one with ruby that look up the workstation’s file system
and send appropriate messages to the server (with backgroundrb?)
When you said your web app needs to browse the local file system, does
it means the file system of the web server or does it means the file
system of the people browsing/access your web page?
Sorry if I wasn’t clear. The file browsing would be on the client end in
the web browser. The user will need to specify lists of files and
directories for processing by the main application.
Although I have seen people do tricks with the file upload, this is a
little clunky for my needs.
Thanks for all the possibilities.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.