Skip to main content
Inspiring
April 2, 2007
Question

IO error upload script/ 404 error

  • April 2, 2007
  • 5 replies
  • 384 views
Is there a reason why my upload script works perfectly on a PC, but not on a mac???
any ideas. thanks J.
( I get an 'IO error' when uploading on a mac. )
This topic has been closed for replies.

5 replies

Inspiring
April 6, 2007
Script would probably help!, I ust thought that someone might have had a similar experience and knew what the problem may be... Anyway here is the script,thanks for taking a look....

_global.logged='dave';
//import the FileReference Object
import flash.net.FileReference;

var file_fr:FileReference = new FileReference();

//object for listening to for FileReference events
var list_obj:Object = new Object();

list_obj.onSelect = function(){
fileName.text = file_fr.name;}

list_obj.onComplete = function(){
fileName.text = "All Done";
prog.rec_mc.clear();}

list_obj.onProgress = function (bytesTotal, bytesLoaded){
var percent = bytesLoaded/file_fr.size;
drawRec(percent);}

list_obj.onCancel = function(){
fileName.text = "Cancel was selected";

}

list_obj.onIOError = function(fileRef){
fileName.text = "IO error with " + fileRef.name;
}

list_obj.onSecurityError = function(fileRef, error){
_root.removeLoading();
fileName.text = "Security error with " + fileRef.name + ":" + error;
}

//httpError
list_obj.onHTTPError = function(fileRef:FileReference, error:Number){
_root.removeLoading();
fileName.text += "HTTP error: with " + fileRef.name + ":error #" + error;
}

file_fr.addListener(list_obj);

browseBtn.onRelease= function(){
file_fr.browse([{description: "Image Files", extension: "*.jpg;"}])
}


uploadBtn.onRelease=function(){
randomNumber=Math.round(Math.random()*100000000);
saveJpgAs=_global.logged+randomNumber+'.jpg';
file_fr.upload("upload/uploadPic.php?username="+_global.logged+"&saveJpgAs="+saveJpgAs);
prog.rec_mc.fillColor = Math.random()*0x1000000;
}

function drawRec (per){
loader.progressBar._xscale = Math.round((per) * 100);
loader.percent.text = Math.round((per) * 100) + "%";}



Thanks J.
Inspiring
April 5, 2007
Well that was an idea. And really the only one that makes sense. There are other folks who are able to do uploads on the Mac. So my guess is your code has something that happens to work on the PC side, but probably shouldn't.

It would be time to post the relevant bits of code.
Inspiring
April 5, 2007
I get the same IO error, every time on a mac, every browser type.... anyone have any ideas? thanks J.
Inspiring
April 3, 2007
Thanks for the response. Error for both Safari and firefox... i've not been able to test on explorer yet.(don't have a mac'). Gonna test on explorer soon. I let you know. Thanks J
Inspiring
April 3, 2007
I think there is an error with that in Safari on the Mac. Does it work in Firefox?