Welcome Guest, Not a member yet? Register   Sign In
Refresh the page duplicates a image uploaded
#2

Refreshing is resubmitting the original form data from the browser's cache (most browsers will even prompt you about this). Since PHP (and, by extension, CodeIgniter) is on the server and basically starts over from the beginning for each request, there are only a few ways to tell the difference between a refreshed page and a completely new request.

You could set some session data (file name and size, depending on how careful you want to be) and prompt the user if they appear to be uploading the same file. You could even prevent them from uploading another file for a set period of time, though in some cases this will just be frustrating for users.
Reply


Messages In This Thread
RE: Refresh the page duplicates a image uploaded - by mwhitney - 03-23-2015, 07:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB