I am sorry to be a bit dense about this, but I cannot quite connect all of the dots.
I can upload a file, change its name, but cannot quite get it into the dbf correctly. I am using the following:
The photo_name field is an image reference file. When I upload the photo, a record is created, but in the control panel there appears to be nothing in the photo_name field. When I create a grid based on the table, the image does not appear in the grid, just an x in the upper left corner. However, the properties is pointing to the session folder. But I don't believe it should be pointing there, it should be pointing to the images subfolder.
What am I not understanding?
Thanks.
Jay
I can upload a file, change its name, but cannot quite get it into the dbf correctly. I am using the following:
<html>
<%a5
dim session.suspectID as c
dim msg as c = ""
if eval_valid("cmd")
dim t as p
dim vc_filename as c
vc_filename = session.suspectID+"_"
vc_filename = vc_filename+time("0h0m0s3")+right(FileToUpload.filename,4)
file.from_blob(ServerSetting.Document_Root + "\\" + "image_map" + "\\"+ "images" +"\\" + vc_filename, FileToUpload.data)
t = table.open("suspect_photos")
t.enter_begin()
t.Suspectid = session.suspectID
t.Photo_Name = image_filename_encode(vc_filename)
t.enter_end()
t.close()
'FileToUpload.filename
msg = "<a href=\"/" + FileToUpload.filename + "\" target=\"_blank\">" + FileToUpload.filename + "</a> was uploaded as "+vc_filename+"<br /><br />"
end if
%>
<head>
<title>File Upload example</title>
</head>
<body bgcolor="#ffffff">
<%a5 ? msg %>
<form action=" <%a5 ? request.script_name %> " method="post" enctype="multipart/form-data">
<input type="file" name="FileToUpload" ><br >
<input type="submit" name="cmd" value="Upload File">
</form>
<%a5
?"Suspect ID is:"+session.suspectID
%>
</body>
</html>
<%a5
dim session.suspectID as c
dim msg as c = ""
if eval_valid("cmd")
dim t as p
dim vc_filename as c
vc_filename = session.suspectID+"_"
vc_filename = vc_filename+time("0h0m0s3")+right(FileToUpload.filename,4)
file.from_blob(ServerSetting.Document_Root + "\\" + "image_map" + "\\"+ "images" +"\\" + vc_filename, FileToUpload.data)
t = table.open("suspect_photos")
t.enter_begin()
t.Suspectid = session.suspectID
t.Photo_Name = image_filename_encode(vc_filename)
t.enter_end()
t.close()
'FileToUpload.filename
msg = "<a href=\"/" + FileToUpload.filename + "\" target=\"_blank\">" + FileToUpload.filename + "</a> was uploaded as "+vc_filename+"<br /><br />"
end if
%>
<head>
<title>File Upload example</title>
</head>
<body bgcolor="#ffffff">
<%a5 ? msg %>
<form action=" <%a5 ? request.script_name %> " method="post" enctype="multipart/form-data">
<input type="file" name="FileToUpload" ><br >
<input type="submit" name="cmd" value="Upload File">
</form>
<%a5
?"Suspect ID is:"+session.suspectID
%>
</body>
</html>
What am I not understanding?
Thanks.
Jay
Comment