Comunidad de diseño web y desarrollo en internet online

"Guardar Como"en un jpg sin usar pop up

Citar            
MensajeEscrito el 20 May 2005 04:19 pm
Hola.
Tengo la duda de como hacer para que una imagen jpg(click de pelicula) que muestro en un web pueda ser descargada haciendo click derecho y usando "guardar imagen como"

Por ahora conosco la opcion de usar pop up creando un html para la imagen..pero la idea es que se pueda hacer desde dentro de un flash.
por favor ideas
saludos

Por waro

13 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 21 May 2005 05:15 am
Hmm... podrias hacer que la imagen sea un boton y al darle clic se descargue un zip con la imagen. O se abra la imagen sola.
Tambien puedes poner un boton con un diskette (a lo windows-default) y linkearlo como te digo.

Código :

boton.onRelease = function(Void):Void {
   getURL("http://dominio.ext/path/imagen.jpg","_self");
}

Por NEO_JP

BOFH

5724 de clabLevel

13 tutoriales
12 articulos

Genero:Masculino   Anime Bloggers Premio_Secretos Team Cristalab

Front-end Developer en Washington, DC

firefox
Citar            
MensajeEscrito el 23 May 2005 05:18 pm
gracias por la idea
voy a hacer eso :D

Por waro

13 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 24 May 2005 12:04 am
Hola,

Tu servidor soporta php¿? De ser asi puedes forzar la descarga del JPG por medio de un PHP de descarga. ^^

How? Asi:

forzar.php

Código :

<?php
   $filename = $archivo;
   $size = filesize($filename);

   header("Content-Transfer-Encoding: binary");
   header("Content-type: application/force-download");
   header("Content-Disposition: attachment; filename=$filename");
   header("Content-Length: $size");
   readfile("$filename");
?>


Y en el respectivo boton llamas al archivo asi:

Código :

on(press){
   getURL("forzar.php?archivo=imagen.jpg");
}


Simplemente cambias el valor de la variable archivo (En este caso imagen.jpg) segun lo vayas necesitando, asi no necesitar complicarte creando archivos .zip

Suerte.

Por jlmm

90 de clabLevel



Genero:Masculino  



Ultima edición por jlmm el 24 May 2005 04:17 am, editado 1 vez

Colombia

firefox
Citar            
MensajeEscrito el 24 May 2005 04:13 am

Por fael

BOFH

2443 de clabLevel

3 tutoriales
2 articulos

 

firefox
Citar            
MensajeEscrito el 24 May 2005 05:24 am
Interesante.

Por NEO_JP

BOFH

5724 de clabLevel

13 tutoriales
12 articulos

Genero:Masculino   Anime Bloggers Premio_Secretos Team Cristalab

Front-end Developer en Washington, DC

firefox
Citar            
MensajeEscrito el 25 May 2005 07:16 pm
hola
cuando intente descargar con el php q me diste
salio un mensaje asi: n ose que hago .


Warning: Cannot modify header information - headers already sent by (output started at /home/cableati/public_html/descarga.php:2) in /home/cableati/public_html/descarga.php on line 6

Warning: Cannot modify header information - headers already sent by (output started at /home/cableati/public_html/descarga.php:2) in /home/cableati/public_html/descarga.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at /home/cableati/public_html/descarga.php:2) in /home/cableati/public_html/descarga.php on line 8

Warning: Cannot modify header information - headers already sent by (output started at /home/cableati/public_html/descarga.php:2) in /home/cableati/public_html/descarga.php on line 9
ÿØÿàJFIFHHÿáÑExifII* þ(1&2A<U˜‚es‡Pj¢¤¤¤¤

Por waro

13 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 25 May 2005 08:42 pm
Hola,

Podrias postear el codigo completo del archivo .PHP¿? :?

Suerte.

Por jlmm

90 de clabLevel



Genero:Masculino  

Colombia

firefox
Citar            
MensajeEscrito el 30 May 2005 09:55 am
jlmm, yo quiero hacer lo mismo pero con PDFS.

si quiero dar la tipica opcion de "abrir/descargar", sigo los mismos pasos? mediante PHP?


gracias.

Por bobjoP

83 de clabLevel



 

msie
Citar            
MensajeEscrito el 30 May 2005 07:03 pm
Si se puede bobjoP , o sino tambien puedes comprimirlo en .zip , o .tar.gz (que lo abre winrar , power archiver, o 7-zip ) .

Por NEO_JP

BOFH

5724 de clabLevel

13 tutoriales
12 articulos

Genero:Masculino   Anime Bloggers Premio_Secretos Team Cristalab

Front-end Developer en Washington, DC

firefox
Citar            
MensajeEscrito el 31 May 2005 02:49 am
hola..no entiendo lo de postear..pero
lo q hice fue usar el mismo codigo php que me escribirte como ejemplo.y puse en un boton :

on(press){
getURL("forzar.php?archivo=imagen.jpg");
}

y no me salio..no se porque

Por waro

13 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 31 May 2005 02:59 am
Sorry,

Postear es una palabra que no existe, es simplemente un sinonimo de "Enviar un Post a este foro" o "Publicar una respuesta", como le quieras llamar.

Podrias publicar el codigo PHP que utilizas, tal vez dar una URL donde estas corriendo las pruebas para ver que ocurre.

Suerte.

Por jlmm

90 de clabLevel



Genero:Masculino  

Colombia

firefox
Citar            
MensajeEscrito el 31 May 2005 09:42 pm
hola:
jlmm mira esto es lo q hago.
en esta direccion www.cableatierra.net/inyectoresfotos.htm
hay un boton a la izquierda abajo q dice galeria3
en la accion de el he puesto:

on(press){
getURL("forzar.php?archivo=saito2.jpg");
}

ademas en mi hosting he puesto saito2.jpg y fozar.php
q tiene el siguiente codigo:


<?php
$filename = $archivo;
$size = filesize($filename);

header("Content-Transfer-Encoding: binary");
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=$filename");
header("Content-Length: $size");
readfile("$filename");
?>




TU PUEDES VER QUE SALE CUANDO APRETAS EL BOTON.
DIME PORFA PORQ ME SALE ESO Y Q DEBO HACER

MUCHAS MUCHAS GRACIAS

Por waro

13 de clabLevel



Genero:Masculino  

msie

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.