Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem with the browser in a CGI written in Perl

Posted on 2009-05-18
5
Medium Priority
?
257 Views
Last Modified: 2013-12-25
I have to download a list of files to an USB disk mounted in a Red Hat. One of the input parameters of the CGI is the USB mount point.

One of the requierments is to browse the USB directories to obtain the destinatary directory in the device. I have tried with the standard HTML control, but I can not set up the mount point where I want.

I have tried to install the Wx::Perl::BrowseButton, but I could not complete the module installation.

Are there any other alternative? Can anyone say me how to setup the BrowseButton module?
0
Comment
Question by:dpeinador
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:Adam314
ID: 24414272
Are you using a webserver here?  Is the USB device on the server, or the client?  If, in HTML, you have a file input type, it will be displayed with a browse button in the web browser.

The Wx is a module to give you a graphical interface - it does not work within CGI.
0
 

Author Comment

by:dpeinador
ID: 24420584
The <input type = "file" .../> element does not work for me because you can not select a directory (only files) and also you can not set up the initial directory /media/usbdisk. So I think it is not enough solution.

The  Wx::Perl::BrowseButton control seems to be enough, but the installation of the Wx module failed.

Are there any other posibility, perhaps a custom popup that shows the directories under /media/usbdisk/?
0
 
LVL 39

Expert Comment

by:Adam314
ID: 24423484
What are you trying to do?  It isn't clear what should happen on the client, and what on the server.
0
 

Author Comment

by:dpeinador
ID: 24429012
Well, I have a touch screen PC that runs in exhibition centers. I need that when a user insert a pen drive or a SDCard the application shows a new screen that show a checkbox list with the files to download to the USB, also I need to give the user the option to choose the destiny directory in the USB disk to download.

I implemented a CGI with Perl that is shown only when the pen drive is inserted. Now I need to show the directory tree because the user needs to say where to copy the selected files.

Anyone can assist me with the directory browser control, now I am thinking in display a new CGI page that acts as a browser.

Thanks in advance
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 1500 total points
ID: 24433443
I'm assuming your webserver is not running on the touch screen PC.  If this is the case, it is not possible for the webserver to get a directory listing of, or to save files to, the USB drive/SDCard.


I think the best way to accomplish what you want would be to have an application written that runs on the touch screen PC.  It would then be able to get a directory listing on the USB/SD, and save files to it.  Going with this method, there is no need for a webserver (except possibly to serve the requested files - or the files could just be stored on the touch screen PC along with the app).
Going with this method, you could use perl.  To generate the display, you could use Wx or Tk.  There are a few other GUI interfaces for perl, but I think these 2 are the most popular.  I personally use Tk.
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question