
10/11/2010, 13:06
|
 | | | Fecha de Ingreso: enero-2006 Ubicación: www.ecocargo.cl
Mensajes: 683
Antigüedad: 19 años, 1 mes Puntos: 8 | |
Subir multiples archivos con sa-fileup encontre un codigo en la web para subir multiples archivos de forma dinamica y lo limpie lo dejo aca para que lo vean
default.asp
Código:
<%@LANGUAGE="VBSCRIPT"%>
<%
maxpicsperalbum = 8
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form method="POST" action="subir.asp" ENCTYPE="MULTIPART/FORM-DATA">
<% For PicIndex = 1 To maxpicsperalbum %>
<tr>
<td><input type="file" name="file<% =PicIndex%>"></td>
</tr>
<% Next %>
<tr>
<td> </td>
</tr>
<tr>
<td><input type="submit" value="Upload Selected Photos"></td>
</tr>
</form>
</table>
subir.asp
Código:
<%@LANGUAGE="VBSCRIPT"%>
<%
Set upl = Server.CreateObject("SoftArtisans.FileUp")
upl.path = server.mappath("arc")
Album_ID = upl.form("Album_ID")
for each item in upl.form
If IsObject(upl.form(item)) Then
If Not upl.Form(item).isEmpty Then
KeepProcessing = True
PicNumber = Replace(item,"FILE","")
If InStr(LCase(upl.Form(item).UserFilename),".jpg") > 0 then
FileExtension = "jpg"
ElseIf InStr(LCase(upl.Form(item).UserFilename),".jpeg") > 0 then
FileExtension = "jpg"
ElseIf InStr(LCase(upl.Form(item).UserFilename),".jpe") > 0 then
FileExtension = "jpg"
ElseIf InStr(LCase(upl.Form(item).UserFilename),".gif") > 0 then
FileExtension = "gif"
Else
KeepProcessing = False
End If
If KeepProcessing = True Then
getname = "Pic_" & Album_ID & "_" & PicNumber
getthumbname = "Pic_" & Album_ID & "_" & PicNumber & "_thumb"
ThumbNailName = getthumbname & "." & FileExtension
filename = getname & "." & FileExtension
upl.Form(item).SaveAs upl.Path & "/" & Filename
End If
End if
End If
next
Set upl = nothing
%>
estructura de carpetas:
FILEUP ' carpeta
---> arc ' carpeta
---> defaul.asp
---> Subir.asp
espero le s sirva
__________________ Mc_Quake Para ayudar en lo que se pueda:Zzz: |