Php + js to modify the idea of commercial films, how to modify multiple commercial films?

Let me first review my uploading practice ~

the way to upload multiple merchandise videos is
use onchange to confirm input file

<input multiple type="file" id="file1" name="icons[]" class="" accept="image/jpeg, image/png, image/jpg">

then use FileReader to create preview and base64 addresses
. The back end uses foreach to fetch all the base64 of $_ POST ["icon"] and download it to the server using file_put_contents

.
foreach ($_POST["icon"] as $key => $value) {

      preg_match("/^(data:\s*image\/(\w+);base64,)/", $value, $result);

the reused corresponding network address is translated into a href= "https://host/images/xxxx/%E6%AF%8F%E5%80%8B%E5%9C%96%E7%89%87%E5%90%8D%E7%A8%B1.xxx" rel=" nofollow noreferrer "> https://host/images/xxxx/ each.
then transfer the chip path information above the second page to the icon number table. The
bits are product_id and icon

.

the question now is:
do you want to modify the patch by default? The first question of
is the question shown. Entering a video to show that he currently has two slices
the second question is how to propose a modification?
how to skip the third unmodified film? Since the value value is attached to the input file algorithm (security issues), how do I know which activities are performed at the back end?

charge

clipboard.png

in front of the merchandise is ID
followed by a different icon address


what I usually do is: multiple images will have a common value in the table, which means that they are uploaded at the same time, and then each image will be deleted and modified separately when it is modified by an id,. Will do


according to this id, probably when you click delete, record the deleted address and then submit it, cycle through the original image address that will be deleted, and then save the newly submitted

.
Menu