• 31-08-2009, 12:03:57
    #1
    Merhaba arkadaşlar, aşağıdaki kodda hangi persist versiyonu kullanılıyor acaba ? Birkaç tane persist yüklemesine rağmen sürücüye aşağıdaki upload kodu çalışmadı. yardımınıza ihtiyacım var..

    Alıntı
    <%
    Set Upload = Server.CreateObject("Persits.Upload.1")
    Upload.CodePage = 1254
    Upload.OverwriteFiles = False
    Upload.SetMaxSize 500000000, True

    Count = Upload.SaveToMemory
    ilan_id=upload.Form("ilan_id")
    For Each File in Upload.Files
    Upload.SetMaxSize 500000000, True
    If File.ImageType <> "JPG" then
    %>
    Lütfen jpg türü bir resim seçiniz.
    <% response.end
    end if
    next

    Randomize
    sayim = int(rnd * 9999999999)
    sayim= ilan_id & "-" & sayim
    dosya_sayaci = 0
    For Each File in Upload.Files
    'on error resume next
    Set File1 = Upload.Files(1)
    Set File2 = Upload.Files(2)
    Set File3 = Upload.Files(3)
    Set File4 = Upload.Files(4)
    Set File5 = Upload.Files(5)
    Set File6 = Upload.Files(6)
    Set File7 = Upload.Files(7)
    Set File8 = Upload.Files(8)
    Set File9 = Upload.Files(9)

    Path = Request.ServerVariables( "APPL_PHYSICAL_PATH" ) &
    "images/" & sayim & ".jpg"
    File.SaveAs Path
    dosya_sayaci = dosya_sayaci + 1
    next
    if dosya_sayaci > 0 then
    Set Jpeg = Server.CreateObject("Persits.Jpeg")
    Jpeg.Open Request.ServerVariables( "APPL_PHYSICAL_PATH" ) &
    "images/" & sayim & ".jpg"
  • 31-08-2009, 20:16:20
    #2
    Üyeliği durduruldu
    Upload Yapmak İçin Bir Script ;
    Default.asp
    <%@LANGUAGE="VBSCRIPT"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
    <title>Dosya Upload</title>
    </head>
    <body>
    <form id="form1" name="form1" enctype="multipart/form-data" method="post" action="DosyaUpload.asp">
      <label>DOSYA :
      <input type="file" name="fileField" id="fileField" />
      </label>
      <input type="submit" name="button" id="button" value="GONDER" />
    </form>
    </body>
    </html>
    DosyaUpload.asp
    <%@LANGUAGE="VBSCRIPT"%>
    <%
    Class DosyaUpload
    'Code By Tuncsoft.Com
    	Public Function UploadYap(blnDosyaYolu)
    	On Error Resume Next	
    			Set stUpload = Server.CreateObject("Persits.Upload")
    			stUpload.SetMaxSize 114857600, True ' 100 mb ye kadar yükler
    			stUpload.Save
    				If Err.Number <> 0 Then
    					UploadYap = "YAZILIM YOK"
    					Exit Function
    				End If
    			Set blnFile = stUpload.Files("fileField")
    				If blnFile Is Nothing Then ' Post edildi fakat dosya yk kontrolü
    					UploadYap = "DOSYAYOK" ' Yani Dosya Yok hatası gönderecek dışarı
    					Exit Function
    				End If
    			strFilename = blnFile.Filename
    			strUploadVideoYolu = blnDosyaYolu & "\" & strFilename
    			blnFile.SaveAs strUploadVideoYolu ' Gelen dosyayı kaydettik
    			Set blnFile = Nothing
    			Set stUpload = Nothing
    			UploadYap = "TAMAM"
    	End Function
    End Class
    Set uploadDosya = New DosyaUpload
    blnYuklemeYap = uploadDosya.UploadYap("C:\Inetpub\vhosts\siteadi.com\httpdocs\upload") ' Dosyanın gönderileceği fiziksel yol
    Response.Write(blnYuklemeYap)
    Set uploadDosya = Nothing
    %>
    Kolay gelsin