Cfx_http5 is a fantastic tool and it gets used here everyday as poart of an "intelligent agent" for a critical business process here... was well worth the $50
It can be used to upload files using post & multipart/formdata . The docs have an example
I'd agree with azadi and recommend the dirWatcher event gateway to process when files are present. the upload time can't be reduced but you can do something similar to what youtube does. "Your upload is being processed. Please check back later".
Main Topics
Browse All Topics





by: azadisaryevPosted on 2009-10-22 at 10:03:14ID: 25636405
part of the 'struggle' can definitely be just the 'uploading' of the file from user's computer to your server - the larger the file the longer it takes to upload it. the only way it can be anything close to 'instant' is if the file is very small and the user's Internet connection is super fast.
there are a number of things you can do, however, to speed up file processing after it has been uploaded.
- you can use <cfthread> to spawn a separate thread for resiging etc the uploaded file
- you can create a scheduled task to process images in a designated directory once every X number of time units
- similar to the above, you can create a 'directory watcher' event gateway to watch for new files in a designated folder and process them as needed
all of the above options will require you to devise a way to notify the user when file processing is finished, if your app requires the user to know this.
on the other hand, if you look at all the web applications out there that work with images - flickr, facebook, etc - none of them are 'instant': a user selects file to upload, then sits and looks at his screen as the files are being processed, the more files the longer... so do consider it very carefully if this is a crucial functionality of your application or not - trying to do this 'in the background' may be more work and add more complexity to your code and application than is justifiable...
Azadi