G
Guest
I need some help, I need the code to allow people that visit my website to be
able to upload pictures to a file on my web server. I have been able to get
close, but not quite there yet.
Set fso = createobject("scripting.filesystemobject")
Set act = fso.CreateTextFile(server.mappath("test.jpg"), true)
act.WriteLine
act.Close
The above code will create the file but will not write any data in it. Below
is the htm code that lets the user upload the file.
<form method="post" action="" name="submit" enctype="multipart/form-data">
Choose A File: <input type="file" name="filefield"><br><br>
<input type="submit" name="submit" value="submit"><br>
</form>
The problem is I can't get the upload image file information to pass
between the htm page to the asp page in a form that it can be written to a
file. I am also not sure that I am using the correct asp code since it is not
a text file I am trying to write. But it is the only code I can find. I do
not need to check to see if the file exits or anything else. All I need is to
upload an image from the htm page pass it to the asp page in the correct form
to be written then write it directly to my web server.
Thanks for you help
able to upload pictures to a file on my web server. I have been able to get
close, but not quite there yet.
Set fso = createobject("scripting.filesystemobject")
Set act = fso.CreateTextFile(server.mappath("test.jpg"), true)
act.WriteLine
act.Close
The above code will create the file but will not write any data in it. Below
is the htm code that lets the user upload the file.
<form method="post" action="" name="submit" enctype="multipart/form-data">
Choose A File: <input type="file" name="filefield"><br><br>
<input type="submit" name="submit" value="submit"><br>
</form>
The problem is I can't get the upload image file information to pass
between the htm page to the asp page in a form that it can be written to a
file. I am also not sure that I am using the correct asp code since it is not
a text file I am trying to write. But it is the only code I can find. I do
not need to check to see if the file exits or anything else. All I need is to
upload an image from the htm page pass it to the asp page in the correct form
to be written then write it directly to my web server.
Thanks for you help