SiemensSEN
asked on
PHP copy files sync/Async
Hello,
I need some help and how to do the following...
I have web application where users can copy files from location A to Location B on the same server. The application passes the date range to the server method. The server script then get a list of files that matches the date range and copy those files to the new location .
If the total file size < max value then copy the file synchronously and notify the users when done
else
-- notify the user that job will be schedule as a batch process
-- execute the copy as separate process
I am making AJAX call to the server and I can copy file from location A->B but I not sure how to spawn off a process to do the copy in a background mode when the size > max Value
Thanks
--
I need some help and how to do the following...
I have web application where users can copy files from location A to Location B on the same server. The application passes the date range to the server method. The server script then get a list of files that matches the date range and copy those files to the new location .
If the total file size < max value then copy the file synchronously and notify the users when done
else
-- notify the user that job will be schedule as a batch process
-- execute the copy as separate process
I am making AJAX call to the server and I can copy file from location A->B but I not sure how to spawn off a process to do the copy in a background mode when the size > max Value
Thanks
--
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
ASKER
My application also allow the user to zip and download the files. Can I use the same solution ?.
This is what I would like to do using your solution:
I submit the request with AJAX to the server
The server spawn off the process to perform action
I return an HTML page to the users (popup/dialog)
-- The page will will have status of the job or a link to the complete job (using the jobID)
-- it would auto refresh every x second.
- for ZIP and download it will have a link when complete
-- for copy -- a status
-- So, if they close the main tab, they can still keep the popup window.. waiting for the job to complete. If they close all windows the job will still process to completion on the server