Merhaba. Bir upload scriptimiz var Sürükle bırak yöntemiyle toplu resim yükleniyor. 1 tane de olsa 100 tane de olsa yüklüyor.
Kuracağımız bir scriptte bunun limitli olması lazım. 15 adet resim yükleme sınırı vermem lazım. Nasıl ayarlayabilirim.
Kodlarımız şu şekilde
cokluupload.asp
<form id="upload" method="post" action="upload.asp" ENCtype="multipart/form-data">
<div id="drop">
<p>Dosyaları buraya sürükleyin</p>
<a>Göz at</a>
<input type="file" name="upl" multiple />
</div>
<ul></ul>
</form>
Buradaki UL araında upload yapılan resimlerin adları sıralanıyor aşağı doğruhttp://prntscr.com/cw8syt http://prnt.sc/cw8zso
Bu da upload.asp kodları
Set upload = Server.CreateObject("Persits.Upload.1")
upload.Save
upload.OverwriteFiles = False
Set file = upload.files("upl")
if Not file Is Nothing Then
Jpeg.Open Server.MapPath("ilanlar/"&resimadi&"")
if Jpeg.Width > jpeg.Height then
Jpeg.Width = 1024
else
Jpeg.Width = 768
end if
jpeg.Height = Jpeg.OriginalHeight * Jpeg.Width / Jpeg.OriginalWidth
Jpeg.Save Server.MapPath("ilanlar/"&resimadi&"")
End IF