Suggestions on form upload

Source: Internet
Author: User
When the previous table is uploaded, although the definition keyis supported, the example is set to upload2014607983d.jpg, but it does not have any effect, so it needs to be optimized. The reason is that the server does not know what type of files the client is uploading, for example, specifying *. jpg, while the File Uploaded by the client may be png or... although the current form upload supports defining keys, for example, upload/2014607/983 d.jpg, it does not actually work and needs to be optimized. The reason is that the server does not know what type of files the client is uploading, for example, specifying *. jpg, while the File Uploaded by the client may be png or doc. Therefore, this method of specifying the key does not play any role in form upload, unless the system only allows the client to upload a specified unique type of file.

It is recommended that when a form is uploaded, the defined key is only the file name, excluding the extension. The extension is automatically added by the system to the original file extension.

I hope this problem can be solved immediately and it is very necessary!

Reply content:

Although the current form upload supports defining keys, for example, upload/2014607/983 d.jpg, it does not actually work and needs to be optimized. The reason is that the server does not know what type of files the client is uploading, for example, specifying *. jpg, while the File Uploaded by the client may be png or doc. Therefore, this method of specifying the key does not play any role in form upload, unless the system only allows the client to upload a specified unique type of file.

It is recommended that when a form is uploaded, the defined key is only the file name, excluding the extension. The extension is automatically added by the system to the original file extension.

I hope this problem can be solved immediately and it is very necessary!

Do not understand the meaning of the landlord, in the form upload you can specify the file MimeType. php sdk in: https://github.com/qiniu/php-sdk/blob/develop/qiniu/io.php
Combined with the upload policy:
Http://developer.qiniu.com/docs/v6/api/reference/security/put-policy.html
InDetectMimeField for MimeType control.

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.