----- Original Message ----- 
From: "K. Parker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 02, 2003 12:00 PM
Subject: Uploading files


> On a site I'm developing, I'm trying to create a script that uploads
> encrypted files and saves them in a particular directory.

You will do in this way :
1. Create a html form which have a "file" type input.
2. Then write a CGI program to pick up the form
3. Read the Data from what you get.
4. Write the data to anywhere in your host as whatever file.
5. Done


> While the CGI mod
> had documentation about how to get an upload field up, I don't know how to
> actually upload the file entered by a user and save it in
"Uploaded_Files/".

you will write a html form like this :
<form method=post enctype=multipart/form-data action="yourscript.pl">
<input type=file name=file>
<input type=submit>
</form>

You will then use CGI to pick up the file, while I will use my own GetForm
module.
Anyway, those data are just going as a scalar data, so you can write them to
anywhere
(If you have the rights to do so) with a file handle which is open for
write.

>
> And secondly, I'm clueless as to how I can ensure that I'm not uploading a
> virus.  Like I said, all the files will be encrypted, and that by a third
> party whose encryption I (obviously) can't crack.  So there is no
> Content-type or similar denotation.

As you've wrote on the top, you are going to receive an "encrypted"  file,
so the
encryption is done on the users side, Is that right ? Maybe I don't
understand well,
so I would like to ask what kind of encryption you are using and what kind
of
file you would likely to be received(Binary or Text). For my knowledge,
encrypted
stuff are being somewhat like text, at least no exectutive stuff. So, there
is nothing
to deal with about virus....


HTH



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to