Canman2005 Posted January 16, 2010 Share Posted January 16, 2010 Hi all I have a ASP problem i'm wondering if anyone can help with. I have a form which has the following field on it <input type="file" NAME="image2"> I then have the following code to upload the image dim filename2 filename2 = UploadRequest("image2").Item("filename2") filename2 = Right(filename2,Len(filename2)-InstrRev(filename2,"\")) if not filename2="" then if instr(ucase(filename2),".GIF")>0 or instr(ucase(filename2),".JPG")>0 or instr(ucase(filename2),".PNG")>0 then UploadPath=server.mappath("../prod_images/")&"\" if not filename2="" then if instr(ucase(filename2),".GIF") then filename2=imageID &"-2.gif" elseif instr(ucase(filename2),".JPG") then filename2=imageID &"-2.jpg" elseif instr(ucase(filename2),".PNG") then filename2=imageID &"-2.png" end if UploadPathFN=UploadPath&filename2 ImgKBSize=savefile("image2",UploadPathFN)/1024 if ImgKBSize>250 then deleteFile(UploadPathFN) msg=msg &" You can only upload images under 250kb." end if end if else msg=msg &" You can only upload *.gif, *.jpg and *.png files." end if end if but for some reason this has stopped working and I cannot figure out why. Can anyone figure out why this is happening? Thanks everyone in advance Quote Link to comment https://forums.phpfreaks.com/topic/188682-asp-image-upload/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.