Yes, I have an issue.
I have my upload profile picture.
1) A popup comes up
2) you upload a image
3) you crop it
4) you press finish, and you get it as your new profile photo (the original uploaded image will be replaced with the cropped one, so the original image will be removed, and will not take any space)
Now if the users cancel or leave this procedure after 2), where the image is uploaded, then the original fullsize image will remain on the server. I thought OK, what about if he closes the popup, warn him, and then remove the image. Then what if the user crashes his browser, leaves the site, or other weird cases. That will still make it remain on the server.
So what can I do about this? I thought about a temp dir, deleting everything in it after xx time, but is this even possible to make without a cronjob? And does there exist an better solution than this, for my issue?