Images are uploaded asynchronously. If the user does not submit the form, what should I do if there are many useless images?
七喜
七喜 2018-11-12 14:26:37
0
6
1718

Pictures are uploaded asynchronously. If the user does not submit the form, what should I do if there are many useless pictures? Asking for help, gentlemen! !

Dear bosses! I upload the image asynchronously, but if the user does not submit the form, this useless image will exist! It’s no use either! How to solve this kind of problem!

七喜
七喜

reply all(3)
总有刁民想害朕

Assign the address of the uploaded image to a variable and write a judgment. If the form submission data operation is successful, the uploaded image will not be deleted, otherwise the uploaded image will be deleted.

  • reply When will that be judged? Only if you submit it will you know. If you don’t submit it, you won’t know.
    七喜 author 2018-11-13 16:46:06
Summer

You can put it in the specified folder and search for useful pictures. The rest are useless and you can delete them

  • reply Thanks! But it feels a bit difficult to query all the images used in the project.
    七喜 author 2018-11-12 18:09:12
七喜

Please help! Dear Gods

  • reply Just write a conditional judgment
    author 2018-11-12 23:47:08
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template