0
파일과 함께 추가 양식 데이터를 보내고 있습니다. 다음은 폼 데이터입니다 : Uploadify 3.1 설정이 작동하지 않습니다.
$(document).ready(function(){
$("#image_file").uploadify({
'method' : 'post',
'queueSizeLimit' : 1,
'formData' : JSON.stringify(register_object),
'buttonText' : 'Profile Pic',
'auto' : false,
'multi' : false,
'swf' : 'js/plugins/others/uploadify.swf',
'uploader' : 'upload.ashx',
'fileTypeDesc': 'Image Files',
'fileTypeExts': '*.jpg;*.png;*.gif;*.bmp;*.jpeg',
'onUploadStart' : function(file) {
$('#file_upload').uploadify('settings', 'formData', JSON.stringify(register_object));
alert(JSON.stringify(register_object));
},
'onUploadSuccess' : function(file,data) {
alert('The file finished processing. ' + data);
},
'onUploadError' : function(file, errorCode, errorMsg, errorString) {
alert('The file ' + file.name + ' could not be uploaded: ' + errorString + ' ' + errorMsg);
}
});
$("#register").submit(function(){
$('#input_password').val(CryptoJS.MD5($('#input_password').val()));
$('#repeat_password').val(CryptoJS.MD5($('#repeat_password').val()));
register_object['first_name']=$("#first_name").val();
register_object['last_name']=$("#last_name").val();
register_object['input_email']=$("#input_email").val();
register_object['input_password']=$("#input_password").val();
register_object['repeat_password']=$("#repeat_password").val();
$("#image_file").uploadify('upload');
return false;
});
});
내가 서버에 포스트 데이터에 액세스
, 나는 아무것도 얻을 : register_object['first_name']=$("#first_name").val();
register_object['last_name']=$("#last_name").val();
register_object['input_email']=$("#input_email").val();
register_object['input_password']=$("#input_password").val();
register_object['repeat_password']=$("#repeat_password").val();
그리고, 다음 내가 사용하는 uploadify 코드입니다.
내가 뭘 잘못하고 있니?