swfupload software features
1.Can display upload progress
2. Good browser compatibility
3. Multiple files can be uploaded at the same time
4. Ajax-like upload without refresh
5.Support flash 8 and flash 9
6. Compatible with other javascript libraries (for example: jquery, prototype, etc.)
swfupload software functions
1. Provides a rich event interface for developers to use
2. You can limit the files to be uploaded on the browser side
3. Use flash to upload, the page does not refresh, and the style of the flash button can be customized
4. Multiple files are allowed to be uploaded at one time, but there will be an upload queue. Files in the queue are uploaded one by one. When the server receives files, it is the same as ordinary form upload files.
swfupload quick start
were added are created to be placed under swfu, we place it under swfu, but it does not have to be placed under swfu, and name it tutor-1.html. Insert the code for introducing swfupload.js into the head
But we also need a swfupload placeholder and an upload button. Placeholder is used for a DOM element that is replaced by the swfupload button after swfupload loads and initializes.
Next, load and initialize swfupload.swf. In this way, we can upload files by clicking "Click me to select files". Isn't it so easy?
swfupload more parameters
?
1.filedata, similar to the name attribute of the form upload control, the default value is filedata. It is not recommended to modify it here, because in flash under Linux, no matter how you modify this value, it will have no effect.
2.post_params, post value. Submit it to the server together with the uploaded file. This stuff is also quite useful. For example, it can verify whether the user is allowed to upload files, etc. In addition, you can use swfupload. addpostparam/setpostparams/removepostparam/addfileparam/removefileparam method This value cannot be modified. It is usually particularly useful when uploading files and additional form information needs to be submitted.
3.requeue_on_error, Whether to re-add failed upload files to the top of the upload queue. The default value is true. When the file upload fails or stops uploading and the uploaderror event is triggered, whether the file that failed to be uploaded will be The file is re-added to the top of the upload queue. Of course, calling the cancelupload method triggers the uploaderror event. The file will not be re-added to the upload queue, but will be discarded.
4.file_types, limits the types of uploaded files, this is very useful and important, the default value is *.*. In addition, it can be set when the user points to upload an image. For "*.jpg;*.jpeg;*.gif;*.png;*.bmp;". Another very important point is that only the browser side limits the uploaded file types, the server side still Verify the file type you upload, otherwise it could be dangerous
5.file_upload_limit, the number of files allowed to be uploaded at the same time, the default value is 0, that is, no limit. When the number of files in the file queue, the number of files being uploaded, and the number of files that have been uploaded successfully exceeds this value, adding files will no longer be allowed.
6.file_queue_limit, the number of files allowed to exist in the queue, the default value is 0, that is, no limit. When the number of files in the file queue exceeds this value, files will no longer be added.
7.button_action, the action performed by clicking the swfupload button, the default value is swfupload.button_action.select_files (multiple file upload)
How to use swfupload
1. First introduce the corresponding js file
2. Instantiate the swfupload object and pass in a configuration parameter object to configure various aspects
3. Click the flash button provided by swfupload, and the file selection window will pop up to select the file to be uploaded.
4. After file selection is completed, files that meet the requirements will be added to the upload queue.
5. Call the startupupload method to start uploading files in the queue
6. Corresponding events will be triggered during the file upload process. Developers use these events to update the UI, handle errors, issue prompts, etc.
swfupload FAQ
The size of the uploaded file does not exceed the value set by swfupload, but why it cannot be uploaded successfully
Usually this is caused by server-side limitations. Taking apache+php as an example, please modify the post_max_size and upload_max_filesize settings in php.ini.
swfupload does not work properly in the website background with session verification
This is because swfupload is equivalent to reopening a new session process when uploading, so it cannot be consistent with the session of the original program. This requires passing the sessionid of the original program when uploading, and using it to "retrieve" its due session.
About the problem of garbled Chinese file names uploaded by swfupload
Actually it’s caused by encoding problems. The program uses utf-8, which is also the encoding when the file name is passed. Therefore, it causes garbled characters or the file cannot be saved. It is only necessary to modify the received file. Take PHP as an example, in upload.php
This can be solved
swfupload update log
1. Fixed BUG, the new version has a better experience
2. Some pages have been changed
Huajun editor recommends:
The swfupload software takes up little memory, has stable performance, is free of any bundles, is green and safe, and is truly a conscientious software! This site also hasLenovo Filez,PDF Editor Abdio PDF Editor,PocoMaker,Dianju AIP general document processing system,FileLocator Pro, available for you to download!

















Useful
Useful
Useful