Suzanne
|
| Posted: 07/07/2002, 11:02 AM |
|
Using ASP MSAccess
Try to upload the picture to the server and to put the name of the file and name of user in database.
But for both actions I need to choose the file:
a. <form method="POST" enctype="multipart/form-data" action="images/getnew.asp">
b. <form method="POST" action="{FileName}" name="picture_private">
I like to transfer the result from b. to a. but that one only reads input type = file , no text.
The first part of the file getnew.asp:
<%@ LANGUAGE="VBSCRIPT" %>
<%
Response.Expires=0
Response.Buffer = TRUE
Response.Clear
byteCount = Request.TotalBytes
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
'file 1
contentType = UploadRequest.Item("file1").Item("ContentType")
filepathname = UploadRequest.Item("file1").Item("FileName")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
if not filename="" then
value = UploadRequest.Item("file1").Item("Value")
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
Set MyFile = ScriptObject.CreateTextFile(Server.mappath(filename))
For i = 1 to LenB(value)
MyFile.Write chr(AscB(MidB(value,i,1)))
Next
MyFile.Close
set myfile = nothing
|
|
|
 |
Suzanne
|
| Posted: 07/08/2002, 2:19 AM |
|
forgot to tell that I'm using CC
|
|
|
 |
|