Javascript-why can I upload a txt file below 1 MB after a post operation, and upload an mp3 file on 1 MB fails.

Source: Internet
Author: User
I encountered a problem. When the post object can upload txt files below 1 MB, the byte set POST object upload fails to upload mp3 files above 1 MB. I encountered a problem.
When the upload of a txt file below 1 MB after the post operation succeeds, the upload of A mp3 file above 1 MB after the byte set POST operation fails.

Reply content:

I encountered a problem.
When the upload of a txt file below 1 MB after the post operation succeeds, the upload of A mp3 file above 1 MB after the byte set POST operation fails.

Several settings are required in php. ini.upload_max_filesize = 8m ;Wangwen business, that is, the maximum file size allowed to be uploaded. The default value is 2 MB. In addition, an enctype attribute must be added to the from form.

Enctype = "multipart/form-data"> Modify php. ini. Remember to restart the server software.

The size of the File Uploaded By the form on the server is limited.
Check the document and change the limits.

You can restrict both the web server and php to see the failure prompts.

What if the txt file uploaded exceeds 1 MB?
How about uploading an mp3 file of 1 Mbit/s?
The format of the uploaded file is limited, or the file size may be limited.

Php. ini limits the file upload size and changes it.

The front-end nginx has a limit on the upload size. You can try to view and modify the size.

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.