Ver Mensaje Individual
  #7 (permalink)  
Antiguo 10/08/2009, 11:22
monxas
 
Fecha de Ingreso: mayo-2009
Mensajes: 201
Antigüedad: 15 años, 11 meses
Puntos: 9
Respuesta: aspupload error en ejemplo basico...

vale, funciona!!
me has salvado. Ahora lo estoy intentando enganchar para tratar imagenes con aspjpeg, pero no se engancharlo bien, por la ruta tambien:

Código asp:
Ver original
  1. <HTML>
  2. <BODY>
  3.  
  4. <&#37;
  5. Set Upload = Server.CreateObject("Persits.Upload.1")
  6.  
  7.  
  8. on error resume next
  9. Upload.SaveVirtual "upload"
  10.  
  11. response.write err.description
  12.  
  13. Set File = Upload.Files(1)
  14.  
  15.   ' Is this a valid image file?'
  16.   If File.ImageType <> "UNKNOWN" Then
  17.      ' Create instance of AspJpeg object
  18.     Set jpeg = Server.CreateObject("Persits.Jpeg")
  19.  
  20.     ' Open uploaded file
  21.     jpeg.Open "upload"
  22.    
  23.     ' Resize image according to "scale" option.
  24.     ' We cannot use Request.Form, so we use Upload.Form instead.
  25.     jpeg.Width = 200
  26.     jpeg.Height = jpeg.OriginalHeight * 200 / jpeg.OriginalWidth
  27.  
  28.     SavePath = Path & "\small_" & File.ExtractFileName
  29.  
  30.     ' AspJpeg always generates thumbnails in JPEG format.
  31.     ' If the original file was not a JPEG, append .JPG ext.
  32.     If UCase(Right(SavePath, 3)) <> "JPG" Then
  33.       SavePath = SavePath & ".jpg"
  34.     End If
  35.  
  36.     jpeg.Save SavePath