Solution to swfupload Upload failure

Source: Internet
Author: User
If (empty ($ Filedata) |! Is_uploaded_file ($ Filedata) & nbsp ;{& nbsp; echo & quot; ERROR: UploadError! & Quot; & nbsp; exit (0); & nbsp;} always stuck in the swfupload Upload failure solution
If (empty ($ Filedata) |! Is_uploaded_file ($ Filedata ))
{
Echo "ERROR: Upload Error! ";
Exit (0 );
}
The filedata value cannot be obtained at this location.

Window. onload = function ()
{
Swfu = new SWFUpload (
{
// Backend Settings
Upload_url: "swfuploadvideo. php ",
Post_params: {"PHPSESSID ":" "," Dopost ":" "," utype ":" shangjia "},
// File Upload Settings
File_size_limit: "500 MB", // 2 MB
File_types: "*. flv ",
File_types_description: "Select flv video format ",
File_upload_limit: "1 ",


File_queue_error_handler: fileQueueError,
File_dialog_complete_handler: fileDialogComplete,
Upload_progress_handler: uploadProgress,
Upload_error_handler: uploadError,
Upload_success_handler: uploadSuccess,
Upload_complete_handler: uploadComplete,

Button_image_url: "img/SmallSpyGlassWithTransperancy_17x18.png ",
Button_placeholder_id: "spanButtonPlaceholder ",
Button_width: 250,
Button_height: 18,
Button_text: 'Select a local video (the maximum video size is 500 MB. multiple videos are supported )',
Button_text_style: '. button {font-family: Helvetica, Arial, sans-serif; font-size: 12pt ;}. buttonSmall {font-size: 10pt ;}',
Button_text_top_padding: 0,
Button_text_left_padding: 18,
Button_window_mode: SWFUpload. WINDOW_MODE.TRANSPARENT,
Button_cursor: SWFUpload. CURSOR. HAND,

// Flash Settings
Flash_url: "../images/swfupload/swfupload.swf ",

Custom_settings :{
Upload_target: "pFileProgressContainer ",
Thumbnails_target: "thumbnails"
},

// Debug Settings
Debug: true
});
};

------ Solution --------------------
There is too little information. Unable to judge.
------ Solution --------------------
Since the prompt "$ Filedata" cannot be obtained, find the cause in the code above. When will it assign a value to $ Filedata? analyze it slowly and take a look.
------ Solution --------------------
Upload1 = new SWFUpload ({... file_post_name: "Filedata ",.......});

Whether this attribute is the sending name of the file data.
If this is inconsistent, the file data and information are indeed not obtained.

For php, you need to use $ _ FILES ["Filedata"] to obtain data.
This part is the cause.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.