Hey there everyone, I'm having a little trouble getting an image to upload to a directory on my testing server with the PHP target and was wondering if you could help?
A file is created in the right location but the resulting image is invalid and its file size is much smaller than it should be.
This is what I've got so far, I'm pretty inexperienced with parseMultipart and outputting files so I might just be doing something ridiculous.
var part:String;
var filename:String;
var byt:Bytes;
var output:FileOutput;
Web.parseMultipart(
function(partName:String, fileName:String):Void {
part = partName;
filename = fileName;
},
function(dt:Bytes, pos:Int, len:Int):Void {
if(part == "image") {
output = File.write(filename, true);
output.write(dt);
}
}
);
Any ideas? Thanks!