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.