You might check into an event gateway. Ray Camden had an example online for
a directory watcher that basically just monitored a directory for new files
to do stuff with.

It shouldn't be too hard to find but if he sees this, I'm sure he will share
it again.

.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com


-----Original Message-----
From: Matt Williams [mailto:mgw...@gmail.com] 
Sent: Tuesday, April 26, 2011 7:58 PM
To: cf-talk
Subject: cffileupload and makeUnique


I'm using cffileupload to allow users to upload multiple photos into a
gallery. For each photo, there is additional processing including
resizing, cropping, writing to DB, etc. At the end four new photo
files are written. At first I tried doing all of that when the image
was uploaded, but that seemed too slow and the user does not need to
wait for this processing to happen before continuing.

I tried cfthread but for some reason it did not work, plus I'm dealing
with CF Standard and the limitations there probably wouldn't help
enough.

Round three, I created a javascript function to make an ajax call
after each photo is uploaded, using the oncomplete attribute of
cffileupload. This works. The photo is uploaded quickly, the ajax call
happens and users are happy.

My problem happens when a file is renamed via the
overwrite="makeUnique" setting of cffile. The function called
oncomplete includes the FILENAME as part of the js object, but only
the original filename and not the new/unique one. I need the unique
filename in order to perform the additional processing.

Any ideas on how to make this happen better?

Thanks,

-Matt W



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344012
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to