JS No refresh upload large files

Source: Internet
Author: User

This is to see the online one, the specific link has forgotten, I manually tested the next

Note: Mobile is not supported, upload directly on Android and iOS card is dead (Baidu a large file upload plugin can be referenced, compatible with the mobile side)

Directly on the demo:

Front-end HTML and JS sections:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >< HTML xmlns= "http://www.w3.org/1999/xhtml" lang= "ZH-CN" >

  

Background PHP section:

<?php$save_file_name = './upload/'. $_post[' filename '; Saved file name if (file_exists ($save _file_name)) {////////    If the file already exists, the file is split for at least the second time to upload this    file_put_contents ($ Save_file_name, file_get_contents ($_files[' file ' [' Tmp_name ']), file_append);//parameter file_append means continue appending to file instead of overwriting}else{    $ddd = move_uploaded_file ($_files[' file ' [' Tmp_name '], $save _file_name);    

  

JS No refresh upload large files

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.