ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have just developed a simple application with perl + CGI
Everything works fine as expected.
Its an application to load a file, process and return it back.
But there is a lack of nice to have feature.
Using file upload I upload the file and the file name is erased from the textbox. I just want to retain that as such the same way as how *any text* would be retained if typed in a text box.
Reason for this request is, since am testing I don't have to click browse and then execute each time. If the filename is retained as such then it would be easier for me to use that filename.
You can't set the filename in a file upload field. The problem is that if you could, it would be very easy to include for example /etc/passwd on a page, hide it, or make it hard to see. It would be a big security problem.
For testing, while not just click reload page? It will ask you if you want to send POST data again, and you just click ok.
No, if you could set the filename, the server could get any file from the client, and that's no better.
Let's say I make a form for login. Two fields for username and password, and a submit button. Below them, I write <br> 1000 times then something like
<input type="file" name="uploadfile" value="/etc/passwd">
If the client did send the file when the submit button is clicked, there would be a problem. So you can't specify the file in the file upload field.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.