3. Product's image file and its information uploads.
Demonstrates uploading some product information text items along with
image file.
fm_path=Server.mappath("uploadfile")
ret=""
set jdupload=Server.CreateObject("JobdaoUpload.Upload")
if(jdupload("action")<>"") then
jdupload.MaxSize=1000000
ret="<font color=red>Result:</font><br>"
Set jdfile=jdupload("FILE")
if(jdfile.Size>jdupload.MaxSize) then
ret=ret&("The file size is more than 1M!")
elseif(Instr(1,jdfile.ContentType,"image",1)=0) then
ret=ret&("The file you uploaded is not a image!")
else
picfilename="productpic."&jdfile.FileExt
jdfile.saveas fm_path&"/"&picfilename,true