File Type support problems and files encountered during batch upload using Apache + PHP and swfupload

Source: Internet
Author: User
Recently, I want to perform background management for a music library. I need to use bulk upload, search online, and find swfupload is easy to use. Then I want to transplant it to my project. Everything went smoothly. I directly found a demo for uploading images in batches, but when I modified the file type (I want to only support mp3, wma, and lrc files), I found that the online materials

Recently, I want to perform background management for a music library. I need to use bulk upload, search online, and find swfupload is easy to use. Then I want to transplant it to my project. Everything went smoothly. I directly found a demo for uploading images in batches, but when I modified the file type (I want to only support mp3, wma, and lrc files), I found that the online materials

Recently, I want to perform background management for a music library. I need to use bulk upload and search materials on the Internet to find that swfupload is very useful. Then I want to transplant it to my project. Everything went fine. I directly found a demo for uploading images in batches, but when I modified the file type (I want to only support mp3, wma, and lrc files, I found that the modification method mentioned in the online materials was not good. After many confusions, I found that the problem lies in browser compatibility. I have always used chrome. Now we provide the correct configuration code:

// File Upload Settingsfile_size_limit: "1024 MB", // 1GBfile_types :"*. mp3 ;*. wma ;*. lrc ", file_types_description:" audio and lyrics ", file_upload_limit:" 0 ",

As you can see, the file_upload_limit setting of the last row: the number of files that can be selected at the same time is unlimited,

The first line sets the size of the files uploaded simultaneously to 1 GB.

In IE, the file type is okay. Only mp3, wma, and lrc files are filtered out, but the file upload size cannot exceed 2 MB, continue to find the cause and find a common problem:

The size of the uploaded file does not exceed the value set by SWFUpload. Why cannot I upload the file successfully?

This is usually caused by server restrictions. Take Apache + PHP as an example. Modify the post_max_size and upload_max_filesize settings in php. ini.

At the beginning, I set post_max_size to 2048, set upload_max_filesize to 200 M (the size limit of a single file), and I found that an error is still reported. After testing, I found that the default value of post_max_size is 8 M, if you set it to 2048 M, there will be no problem. That is to say, the previously set is too large and exceeds the configuration limit. This problem is especially concealed and I was lucky to find it.


The above are the problems and solutions I have encountered when using swfupload. I hope it will be helpful to you. Please leave a message and hope to have more exchanges.

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.