1. how does uploadify bind the button? is it in $ (document). ready (function () {code...}); this does not seem to work. 2. that is, there are many other values that need to be input in addition to the image to be uploaded. I know that these values can be bound using the settings method, but when I... 1. how does uploadify bind the button?
$ (Document). ready (function (){
$("#button_id").uploadify();
});
This does not seem to work.
2. there are many other values that need to be input in addition to images for uploading. I know that these values can be bound using the settings method. However, when I click upload, when multiple values are selected, can I upload only one file to the same controller at the same time? Because I found that when automatic upload is selected, the image name is uploaded to the database first, and then relevant data is written. However, here, the image table and data table are separated and there is a pic_id in the middle. how can we ensure that the pic_id of the image is the same as the data table id? Why am I confused? Thanks.
Reply content:
1. how does uploadify bind the button?
$ (Document). ready (function (){
$("#button_id").uploadify();
});
This does not seem to work.
2. there are many other values that need to be input in addition to images for uploading. I know that these values can be bound using the settings method. However, when I click upload, when multiple values are selected, can I upload only one file to the same controller at the same time? Because I found that when automatic upload is selected, the image name is uploaded to the database first, and then relevant data is written. However, here, the image table and data table are separated and there is a pic_id in the middle. how can we ensure that the pic_id of the image is the same as the data table id? Why am I confused? Thanks.
It is inconvenient to test the plug-in at the moment, but the idea must be the same. here is my idea for your reference.
Your design is to separate the resource table from the data table and associate the data table with the resource ID. do you only need to get the resource ID when submitting the data to the data table? That is to say, you can upload resources first through Ajax and return the resource ID. in this way, either one or multiple uploads can also be processed.
① The plug-in uploads image resources and obtains the resource ID.
② Submit data