Joas wrote:The smart client doesn't have access to the file system of the server for obvious reasons.
What you can do is start a headless client with the headless client plugin after the streaming is complete. The headless client runs server-side and can move the files from root/uploads to the other volume.
Having looked at the various options I have decided this one fits the bill the best. I am however struggling to understand how to monitor the progress and trigger the headless client once all the files are uploaded.
This example is provided, and shows how to report the process back to the console, the issue is how do you pass information from your upload script to the variable monitor ? Essentially I want to be able to allow the user to select a folder containing several images and upload these to the server. Once the upload has completed to trigger the headless client to move the images. IF anything goes wrong to alert the user and the system administrator.
Many thanks
Gordon
- Code: Select all
application.output('total transferred: ' + monitor.getTotalTransferredBytes() + ' / ' + monitor.getTotalBytesToTransfer());
application.output('current file: ' + monitor.getCurrentTransferredFileName() + ' ( ' + monitor.getCurrentFileIndex() + ' / ' + monitor.getTotalFilesToTransfer() + ' )');
application.output('current bytes transferred: '+monitor.getCurrentTransferredBytes() + ' / ' + monitor.getCurrentBytesToTransfer());
if (monitor.isCanceled()) {
application.output('canceled!')
}
if (monitor.isFinished()) {
application.output('finished!')
}