Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI to upload a file

Status
Not open for further replies.

jriggs420

Programmer
Sep 30, 2005
116
US
It seems like most of my posts start this way but: Is it possible to use CGI to upload a file to my server? I'm trying to put an html page on my server that has a browse button, text box, and will allow someone (at this point I suppose anyone) to upload a file onto my server. I have physical access to the server, it's apache, running on a linux box. I did some searching, and have found many opinions, all too complex for me at this point, on how to accomplish this.

I'm looking for something simple, that I can expand upon once I get the basics. CGI/apache are still pretty new to me, but I can handle linux and perl no problem. I've never had to deal with asp or php. I already have ftp setup, that's not really the path I want to take in the long run. TIA for any tips/links/advice-

Joe

Because a thing seems difficult for you, do not think it impossible for anyone to accomplish.
Marcus Aurelius
 
Thanks Kevin,

I missed that one the my first time though the FAQs. In case anyone is interested, I found this one the most useful:

Because a thing seems difficult for you, do not think it impossible for anyone to accomplish.
Marcus Aurelius
 
That method has been superseded by the upload() function. Have a look here in the CGI docs.
 
Heh, figures, I just got the other one to work. So far, I've been uploading text files with no problem. Do you know of any issues in uploading larger files, say for example, mp3/avis? I'm not worried about maintaining ftp type connections (ability to resume broken xfers), but am more interested in file degradation, missing bits etc...

Sorry if that's a dumb question but I'm just learning the ins and outs of server side programming. I haven't found too many pages geared towards what I'm doing/level of expertise. Thanks again-

Because a thing seems difficult for you, do not think it impossible for anyone to accomplish.
Marcus Aurelius
 
That method has been superseded by the upload() function. Have a look here in the CGI docs.

hehehe... maybe I should read those faqs, the one the OP liked was posted 11 Jan 01, 5 years ago! And the other FAQ in the same section is even older. Time for someone to post a new file uploading faq. :)
 
Knock yourself out ;-)

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
I thought there was a rule that says the top ranking member of the MVP list (ahem-ahem) gets to delegate FAQ writing duties to one of the other MVPs of his/her choice. Rank has it's privileges. [2thumbsup]
 
Indeedy, but you have to get at least another 13 to outrank me here, check the full list :p, I'm up to my proverbials at present;-)

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
You've got it backwards Kev. The top-ranked MVP gets to write the FAQs, as they're assumed to be the most qualified and appropriate person to do so ;-).
 
We'll just have to wait for goBoating so :p

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Kevin slowly walks out of the room backwards hoping nobody will notice....
 
Well, I have not switched over to the 'upload()' method yet. If anyone writes an FAQ, I'd be more than happy to have a go at on my server. If not, I'll eventually get around to using the link Ishnid provided. (it's hard to get motivated to replace something that works :\ )

Because a thing seems difficult for you, do not think it impossible for anyone to accomplish.
Marcus Aurelius
 
Indeed, it is a little dated and, to borrow and phrase, I'm up to my proverbials.... I won't be getting to it soon. But, if I come upon some time, I'll try to get to it, if no one beats me to it.....

please..... beat me to it... ;-)

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top