Solved

file transfer to server

Posted on 2000-04-08
1
198 Views
Last Modified: 2013-12-25
Hello,
I have an HTML form which contains a TEXTAREA box and submit button.  Currently I paste text into the box and click submit and the submitted text is processed by my cgi script.  However, I am now running into the problem for the case in which I have to paste a very large block of text.  When I paste a very large block of text, the browser (IE 5.0) will freeze for up to 5 minutes before the text is finally rendered in the textarea box at which point I can then click submit and everything works fine.  But I don't like waiting 5 minutes waiting for the browser to come back.  So I was wondering if there is a way to somehow attach or specify the location of a file (which contains the large block of text) on the HTML form and have that file transferred to the HTTP server so that my cgi script can then process it ?
The solution has to be platform independent.  Also, if you have a better idea than transferring the file please suggest it (I am mostly concerned with avoiding the browser freeze up problem).
Thanks
0
Comment
Question by:chichioco
1 Comment
 
LVL 1

Accepted Solution

by:
mafweb earned 80 total points
ID: 2696684
there is a
<input type=file> tag. AFAIK, this works with IE, NS and opera. One day also lynx shall support this. Hope this is platform independent enough :)
use it like this:
<form action=whatever.cgi method=post enctype=multipart/form-data>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="100000">
<!--size in bytes-->
<input type=file name=xyz>

the file is then passed along with the other post_vars

hope this helps,

maf
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now