Seven Qiniu storage-problems with post files in PHP project using the Bootstrap-fileinput plugin to seven cow space

Source: Internet
Author: User

My demand is this, there is a form of personal information, the form contains photos, names, gender, age, etc., photos need to be submitted to seven cattle inside save, the form of photo upload using bootstrap-fileinput plug-in; My idea is that users fill out the text information in the form and select photos to upload to seven cows, After successful upload, seven cows will return a key, which is the file name, and then click the Submit button to save the key and the other items already filled in the form into the database.

My Bootstrap-fileinput configuration code is as follows:

    

I don't know if token should be in this position, but token is a normal assignment,

The form code is as follows:

But now is the picture does not go up, do not know where the configuration is not correct, please teachers to help, thank you!

Here is the effect of bootstrap-fileinput, with an upload button:

Default effect:

Select the post-image effect:

Reply content:

My demand is this, there is a form of personal information, the form contains photos, names, gender, age, etc., photos need to be submitted to seven cattle inside save, the form of photo upload using bootstrap-fileinput plug-in; My idea is that users fill out the text information in the form and select photos to upload to seven cows, After successful upload, seven cows will return a key, which is the file name, and then click the Submit button to save the key and the other items already filled in the form into the database.

My Bootstrap-fileinput configuration code is as follows:

    

I don't know if token should be in this position, but token is a normal assignment,

The form code is as follows:

But now is the picture does not go up, do not know where the configuration is not correct, please teachers to help, thank you!

Here is the effect of bootstrap-fileinput, with an upload button:

Default effect:

Select the post-image effect:

Somebody help me, thank you.

$("#pImg").fileinput({                uploadUrl: "http://up.qiniu.com",                uploadAsync: true,                overwriteInitial: false,                uploadExtraData: {                    token: "
  
   ",                },                slugCallback: function(filename) {                      //这里的回调你可以将上传成功后返回的key保存到一个input type=hidden 或者哪里看你自己,然后就可以了,再点击保存的时候,将这个input的值往你的服务端传就ok啦                }            });
  • 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.