search

Home  >  Q&A  >  body text

Images are uploaded asynchronously. If the user does not submit the form, what should I do if there are many useless images?

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!

七喜七喜2246 days ago1704

reply all(6)I'll reply

  • 总有刁民想害朕

    总有刁民想害朕2018-11-13 16:44:32

    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
    0
  • 七喜

    When will that be judged? Only if you submit it will you know. If you don’t submit it, you won’t know.

    七喜 · 2018-11-13 16:46:06
  • Summer

    Summer2018-11-12 18:06:35

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

    reply
    0
  • 七喜

    Thanks! But it feels a bit difficult to query all the images used in the project.

    七喜 · 2018-11-12 18:09:12
  • 七喜

    七喜2018-11-12 15:20:45

    Please help! Dear Gods

    reply
    0
  • 虔

    Just write a conditional judgment

    · 2018-11-12 23:47:08
  • Cancelreply