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啦 } });