javascript - About uploadify uploading all images at the same time

WBOY
Release: 2023-03-02 06:34:02
Original
1131 people have browsed it

1. How does Uploadify bind the button button? Is it in

$(document).ready(function(){

<code>$("#button_id").uploadify();</code>
Copy after login
Copy after login

});
This doesn’t seem to work.
2. In addition to pictures, when I upload, there are many other values ​​that need to be entered. I know that I can use the settings method to bind these values, but when I click to upload, when I select multiple pictures, there is only one. It has been uploaded, can multiple pictures be uploaded to the same controller at the same time? Because I found that when selecting automatic upload, this is uploaded to the background one by one. At this time, you need to write the image name to the database first, and then write the relevant data. But here my picture table and data table are separated, and there is a pic_id associated with them. How can I ensure that the pic_id of the picture is the same as the id of the data table? I'm more confused about this now? Thank you

Reply content:

1. How does uploadify bind the button button? Is it in

$(document).ready(function(){

<code>$("#button_id").uploadify();</code>
Copy after login
Copy after login

});
This doesn’t seem to work.
2. In addition to pictures, when I upload, there are many other values ​​that need to be entered. I know that I can use the settings method to bind these values, but when I click to upload, when I select multiple pictures, there is only one. It has been uploaded, can multiple pictures be uploaded to the same controller at the same time? Because I found that when selecting automatic upload, this is uploaded to the background one by one. At this time, you need to write the image name to the database first, and then write the relevant data. But here my picture table and data table are separated, and there is a pic_id associated with them. How can I ensure that the pic_id of the picture is the same as the id of the data table? I'm more confused about this now? Thank you

Because it is not convenient to test the plug-in at the moment, but the idea is definitely the same. I will give you my idea for your reference.
Your design separates the resource table from the data table. The data table is associated with the resource ID. When submitting data to the data table, do you only need to get the resource ID? That is to say, upload the resource first through Ajax and return the resource ID, so that whether it is uploading one or multiple images, it can be processed equally.


① The plug-in uploads image resources and gets the resource ID

②Submit data

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!