Comunidad de diseño web y desarrollo en internet online

Filereference

Citar            
MensajeEscrito el 20 Oct 2007 11:38 pm
Buenas, hice un script para subir archivos con la libreria, Filereference, como en el ejemplo este, http://www.cristalab.com/tutoriales/121/subir-archivos-en-flash-con-filereference, el tema es que cuando mande archivos grandes, (16 MB), al script de php le llegan las variables por POST vacias...
Pense que podia ser la limitacion de php por el memory_limit, pero lo modifique y sigue pasando lo mismo...

Tambien busque en la ayuda de Filereference en el metodo upload y dice esto "Flash Player can upload files of up to 100 MB"...

Asique nose donde esta la limitacion....

Saludos...

Por andresf87

1 de clabLevel



Genero:Masculino  

msie7
Citar            
MensajeEscrito el 21 Oct 2007 07:54 am
buenas... la limitacion ocurre despues de los 2MB... Agrego el codigo..

import flash.net.FileReferenceList;
import flash.net.FileReference;
var allTypes:Array = new Array();
var imageTypes:Object = new Object();
imageTypes.description = "Todos (*.*)";

imageTypes.extension = "*.*";
allTypes.push(imageTypes);
var listListener:Object = new Object();
listListener.onSelect = function(fileRefList) {
crearArchivos(fileRefList.fileList);
}
var fileRef:FileReferenceList = new FileReferenceList();
fileRef.addListener(listListener);
var btnExaminar = this.createEmptyMovieClip("btnExaminar", this.getNextHighestDepth());
btnExaminar.createTextField("texto",0,0,0,100,20);
btnExaminar.texto.text="Examinar...";
btnExaminar.onRelease = function () {
fileRef.browse(allTypes);
}

function crearArchivos(files) {
for(var i in arrRef) {
arrRef[i].removeMovieClip();
}
delete puntero;
delete arrRef;

btnExaminar.enabled=false;
var posY=50;
_global.arrRef = new Array();
for(var i=0; i<files.length; i++) {
var c=this.createEmptyMovieClip("archivo"+1, this.getNextHighestDepth());
c.attachMovie("bar_load","load_progress",this.getNextHighestDepth());
c.load_progress.txtFilename.text= ">> (" + Math.ceil(files[i].size/1000) + " Kb) " + files[i].name+" <<";
c.file=files[i];
c._y=posY;
posY+=c._height;
arrRef.push(c);
}
_global.puntero = 0;
arrRef[puntero].file.addListener(fileListener);
arrRef[puntero].file.upload("upload.php");
}
var fileListener:Object = new Object();
fileListener.onOpen = function(file) {
arrRef[puntero].load_progress.txtStatus.text= "Empezando...";
arrRef[puntero].load_progress.loading._alpha = 100;
}
fileListener.onProgress = function(file, bytesLoaded, bytesTotal) {
var porcentaje= Math.round(bytesLoaded*100/bytesTotal);
arrRef[puntero].load_progress.porcent.text = porcentaje + "% <<>> " + bytesLoaded/1000 + " KB";
arrRef[puntero].load_progress.gotoAndStop(porcentaje);
arrRef[puntero].load_progress.txtStatus.text= "Subiendo...";
}
fileListener.onComplete = function(file):Void {
arrRef[puntero].load_progress.txtStatus.text="Listo!";
arrRef[puntero].load_progress.loading.stop();
arrRef[puntero].load_progress.loading._alpha = 0;
subirSiguiente();
}
fileListener.onHTTPError = fileListener.onIOError = fileListener.onSecurityError = function(file, error) {
arrRef[puntero].load_progress.txtStatus.text="Error: "+error;
arrRef[puntero].load_progress.loading._alpha = 0;
subirSiguiente();
}

function subirSiguiente () {
if(puntero<arrRef.length-1) {
puntero++;
arrRef[puntero].file.addListener(fileListener);
arrRef[puntero].file.upload("upload.php");
} else {
btnExaminar.enabled=true;
}
}

Por andresf87

1 de clabLevel



Genero:Masculino  

msie7

 

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