Persist bileşeni yüklü ise gönderilen dosyayı
Jpeg.Width ve
Jpeg.Height ile en ve boy bilgilerini al ve 0 dan farklı ise direk dosyayı silip hata verdirmeyi dene.
Örn:
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Path = "Buraya dosya yolun girilecek"
Jpeg.Open Server.MapPath("/" ) & Path
iResimWidth = Jpeg.OriginalWidth
iResimHeight = Jpeg.OriginalHeight
Set Jpeg = Nothing
if iResimWidth=0 or iResimHeight=0 or iResimWidth="" or iResimHeight="" then
Set foto_sil = fso.GetFile(Server.MapPath(Path))
foto_sil .Delete
response.write "Girmiş olduğunuz dosya hatalıdır."
end if