ajax - PHP 5.4 - reliably interrogate session.upload_progress information -
most of advice see says use following configuration value session.upload_progress data
session.upload_progress.cleanup=on
from can see result of approach $_session["upload progress key"] erased on completion of upload, wiping out data related completed file upload.
as 1 running separate xhr process poll data , display progress bar, if file being uploaded small, conceivable separate xhr thread polls after file upload has completed , data has been removed.
i have 2 questions proponents of instantaneous deletion of data on completion of upload approach:
- if no data found on first xhr poll, there way 1 can reliably identify whether file has finished uploading successfully, or whether has gone wrong , upload has not in fact started.
- even if 1 or more polls has run during upload successfully, on final poll, upload data has been erased, given file error status contained within erased data, there way 1 can reliably identify file upload successful?
alternatively, there no reliable way achieve either/both of above , better approach use
session.upload_progress.cleanup=off
and interrogate upload data on completion, manually manage cleanup of session data?
Comments
Post a Comment