Version 2.5 beta 3

I've been working on an wordpress image and video database using SWFupload as my fileuploader.

Uploading videos is going fairly well. (had a crash once or twice) but my image uploads get corrupted to a point where some cannot be thumbnailed. corrupt JPEG headers and what not. If I upload the images by ftp and run the thumbnailer there are no issues. most of the code is the same as the demos and I really cant figure where things are going wrong. Ofcourse could be flash
related but maybe you have some ideas on it. Many thanx in advance.

According to the SWF debug window all uploads were completed succesfully.

if you need more information just tell me what you need.
php code


if (move_uploaded_file( $_FILES['Filedata']['tmp_name'] , $upload_file ) ) {
if (in_array($wpfs->file_extension($_FILES["Filedata"]["name"]), array("jpg","gif","png"))) {
list($width, $height) = getimagesize($upload_file);
$name = $_FILES["Filedata"]["name"];
$new_image = new pss_image;
$new_image->albumid = $album_id;
$new_image->name = $wpfs->title_prepare($_FILES["Filedata"]["name"]);
$new_image->filename = $wpfs->file_prepare($_FILES["Filedata"]["name"]);
$new_image->thumb = "image-".$wpfs->file_prepare($wpfs->strip_extension($name)).".jpg";
$new_image->location = $album_location;
$new_image->width = $width;
$new_image->height = $height;
$new_image->type = $new_image->type();
$new_image->author = 1;
$new_image->adddate = current_time('mysql');
$new_image->size = $_FILES["Filedata"]["size"];
$new_image->save();
//$wpfs->thumb($upload_file, WV_THUMB_PATH."image-".$wpfs->file_prepare($wpfs->strip_extension($name)).".jpg");
}
}

the swf script

var swfu;

SWFUpload.onload = function () {
var settings = {
flash_url : "'. WV_PLUGIN_URL .'/swfupload/swfupload.swf",
flash9_url : "' .WV_PLUGIN_URL .'/swfupload/swfupload/swfupload_fp9.swf",
upload_url: "'.$_SERVER['PHP_SELF'].'?page=images&upload=images",
post_params: {
"token" : "set",
"albumid" : "'.$album_id.'",
"albumname" : "'.$album_name.'",
},
file_size_limit : "250 MB",
file_types : "*.jpg;*.png;*.gif",
file_types_description : "Image Files",
file_upload_limit : 500,
file_queue_limit : 250,
custom_settings : {
progressTarget : "fsUploadProgress",
cancelButtonId : "btnCancel"
},
debug: true,

// Button Settings
button_image_url : "'. WV_PLUGIN_URL.'/swfupload/XPButtonUploadText_61x22.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 61,
button_height: 22,

// The event handler functions are defined in handlers.js
swfupload_preload_handler : swfUploadPreLoad,
swfupload_load_failed_handler : swfUploadLoadFailed,
swfupload_loaded_handler : swfUploadLoaded,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
queue_complete_handler : queueComplete // Queue plugin event
};
swfu = new SWFUpload(settings);
}