
adjunto el codigo del Free Upload:
<%
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
%>
<!-- #include file="freeaspupload.asp" -->
<%
' ************************************************** **
' Cambiar el valor de la siguiente variable
' para indicar el directorio de destino.
' El directorio indicado debe tener permisos de escritura
' de caso contrario el script fallará mostrando un error.
Dim uploadsDirVar
uploadsDirVar = "C:\Inetpub\wwwroot\MR_AF\Imagenes\Fotos de Maquinas\"
' ************************************************** **
function SaveFiles
Dim Upload, fileName, fileSize, ks, i, fileKey, resumen
Set Upload = New FreeASPUpload
Upload.Save(uploadsDirVar)
' If something fails inside the script, but the exception is handled
If Err.Number <> 0 then Exit function
SaveFiles = ""
ks = Upload.UploadedFiles.keys
if (UBound(ks) <> -1) then
resumen = "<B>Archivos subidos:</B> "
for each fileKey in Upload.UploadedFiles.keys
resumen = resumen & Upload.UploadedFiles(fileKey).FileName & " (" & Upload.UploadedFiles(fileKey).Length & "B) "
next
else
resumen = "El nombre del archivo especificado en el formulario no es valido en el sistema."
end if
'comentar la siguiente linea si no se desea mostrar el resumen
' SaveFiles = resumen
end function
%>
<%
'Dim Strattach1
'Strattach1=("attach1")
'Response.Write(Strattach1)
%>
<HTML>
<HEAD>
<TITLE>Test Free ASP Upload</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
}
body {
background-color: #FFFFFF;
background-image: url(../Imagenes/Fondos/Graphite.jpg);
}
.Estilo1 {color: #FFFF00}
-->
</style></HEAD>
<BODY>
<h1>Subir archivos</h1>
<p>Advertencia: Asegurece que el nombre del activo sea el mismo nombre que tiene el archivo a grabar.</p>
<div style='margin-left:150'><form name="frmSend" method="POST" enctype="multipart/form-data" action="pruebaupload.asp">
<p>F o t o:
<input name="attach1" type="file" size="35">
<br>
Dibujo:
<input name="attach2" type="file" size="35">
<br>
<br>
<input type=submit value="Subir Archivo">
</p>
</form>
<BR></div>
<%
'solo llamo al UPLOAD si hay envio de formulario
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
response.write SaveFiles()
'Hace el upload de los archivos enviados y muestra el resumen
end if
%>
</BODY>
</HTML>
La otra parte del codigo que se incluye en el principal si lo requieren me avisan
Saludos