Welcome Guest, Not a member yet? Register   Sign In
Upload file, process in background, present status
#1

[eluser]Unknown[/eluser]
Hello,

What's BCP on uploading files in CI and processing them in the background?

I need a fairly simple way to deal with long running jobs, and only need one job at a time to be processed since this is part of the backend/admin side of the site.

This is essentially what I'm looking for...

-User visits http://foo.com/admin/upload and is presented with a standard upload form
-User selects file, posts form.
-Our existing form checks verify the file is correctly formatted or presents user with an error, nothing is queued.
-If the file is OK, it is saved to a temporary location and another php script is called to process the file
-User is redirected to http://foo.com/admin/upload/status, if the job is still running, they are notified of that, if the job is done, they are shown the results (php script has output stdout to a text file)
-If the user returns to http://foo.com/admin/upload and a job is still runing, they are redirected to http://foo.com/admin/upload

What in the CI framework would be of use to me here?




Theme © iAndrew 2016 - Forum software by © MyBB