Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/07/2008, 18:29
Avatar de marlonbtx
marlonbtx
 
Fecha de Ingreso: febrero-2006
Ubicación: Tijuana,B.C. Mexico
Mensajes: 151
Antigüedad: 18 años, 3 meses
Puntos: 2
Respuesta: Image Resizer

si ya lo corregui, pero sigo teniendo el problema.. , este es todo el codigo lo tengo dentro de una clase, las imagenes ya se mostraban antes pero las reduci con html.. entonces como estoy usando MVC con cakePHP , mando llamar la imagen asi en la vista

Código PHP:
echo "  <img src='/my_files/download/" $file['FilesProduct']['my_file_id'] . "' width='128' height='96' /></img>"

entonces el request se hace asi

http://tjnix.sytes.net/my_files/download/3

como te digo antes ya funcionaba pero sin redimensionar las ventanas osea que tenia este codigo nadamas

Código PHP:
    function download($id
    {
           
Configure::write('debug'0);
        
$file $this->MyFile->findById($id);
          
header('Content-type: ' $file['MyFile']['type']);
        
header('Content-length: ' $file['MyFile']['size']);
        
header('Content-Disposition: attachment; filename="'.$file['MyFile']['name'].'”');
        echo 
$file['MyFile']['data'];
        exit();
    } 

entonces en el request te traia la imagen pero del tamaño original