Gracias por la respuesta tengo este codigo
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:Button x="92" y="40" label="Browse..." click="abreJanela()"/> <mx:Image x="58" y="86" width="147" height="137" id="image"/> <s:Button x="200" y="40" label="Guardar" id="boton_guardar" click="guardar(event)" /> <fx:Script> <![CDATA[ import flash.events.DataEvent; import flash.events.Event; import flash.events.MouseEvent; import mx.graphics.codec.JPEGEncoder; private var obj_FileReference:FileReference; private var myFilter = new FileFilter ("imagens (*.jpg;, *.jpeg;, *.png;, *.gif;)","*.jpg;, *.jpeg;, *.png;, *.gif"); private function abreJanela():void{ obj_FileReference = new FileReference(); obj_FileReference.browse([myFilter]); obj_FileReference.addEventListener(Event.SELECT,carregaFoto); obj_FileReference.addEventListener(Event.COMPLETE,mostraFoto); } private function carregaFoto(e:Event):void { obj_FileReference.load(); } private function mostraFoto(e:Event):void{ image.load(obj_FileReference.data); } private function guardar(e:MouseEvent):void { boton_guardar.visible = false; var bitmapData:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight); bitmapData.draw(stage); var bitmap:Bitmap = new Bitmap(bitmapData) var jpg:JPEGEncoder = new JPEGEncoder(80); var ba:ByteArray = jpg.encode(bitmapData); obj_FileReference.save(ba, 'captura.jpg'); boton_guardar.visible = true; }
]]> </fx:Script> </s:Application>
mi pregunta es como puedo aser que esas imagenes que subo se guarden en mi base de datos? pero no en blob sino la direccion y las imagenes se guarden en el servidor ?
gracias de ante-mano .
|
Por jmancilla
Envíale un mensaje privado
|