Google Answers Logo
View Question
 
Q: Text file - upload - reading line and appending to file on webserver ( No Answer,   3 Comments )
Question  
Subject: Text file - upload - reading line and appending to file on webserver
Category: Computers > Programming
Asked by: jellybeans-ga
List Price: $10.00
Posted: 29 Jan 2004 11:41 PST
Expires: 29 Jan 2004 17:01 PST
Question ID: 301516
Hello

I'm trying to achieve the following:-

A user will hit a page on my website. They will upload a text file to
my server. The text file they are uploading will contain exactly one
line of delimited text.   I need to somehow capture that line directly
after the upload, and append this line to another text file on the
server.

Is this possible?  What other alternatives do I have? 

Please do not post links for achieving this, unless it is directly
related to the above situation.

Thanks
Answer  
There is no answer at this time.

Comments  
Subject: Re: Text file - upload - reading line and appending to file on webserver
From: wengland-ga on 29 Jan 2004 12:52 PST
 
It is quite possible, however we'd have to know what kind of back-end
software you have running your webserver.

It will be done with CGI - a program will accept the file upload, save
the file to a temp directory, read the file, and write the contents of
the file to the existing temp file.

You can add sanity checking, etc as needed.

This can be done in perl, VB, c++, C#, Java, Python, sh, csh, ksh, PHP, ad nauseum.

But, first you must define what resources you have on your webserver.
Subject: Re: Text file - upload - reading line and appending to file on webserver
From: jellybeans-ga on 29 Jan 2004 12:59 PST
 
hello,

we're running the site on a windows 2000 server. We can run CGI scripts.

Any idea exactly how or where we could get such a CGI script?
Subject: Re: Text file - upload - reading line and appending to file on webserver
From: wengland-ga on 29 Jan 2004 13:31 PST
 
I don't know of a pre-written CGI script that would solve your problem.

If you have some CGI scripting language pre-installed (Perl, PHP, etc)
and would like one of the Google Researchers to write the script, I'm
sure it would be done shortly.

You'd just need to either post a clarification to this quesiton, or a
new question.  Detail the specifications and what scripting language
to use.

You should get a workable script in a short amount of time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy