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!
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.
You can put it in the specified folder and search for useful pictures. The rest are useless and you can delete them
Please help! Dear Gods