How do I use CFTHREAD in combination with CFFILE Upload

I've been reading how CFTHREAD is supposed to release the
client so that long-lasting operations like a CFFILE upload can
continue to do their business while the client does something else.
How does this work exactly? I can't find any concrete
references. For example, I have a regular file upload form. A user
uploads a large file, say 100Mb, and I want to use CFTHREAD (or
something) to handle the upload process, which I know may take
hours depending on the connection, and immediately return the page
for the client saying "Your file is being processed. Please check
back later."
I tried wrapping some CFFILE code with CFTHREAD, but when I
ran it the page just sat there working while the file was being
uploaded, so I did not witness any change whatsoever in how its
being handled. What am I missing?
<cfthread action="run" name="uploadVideo">
<cffile
action="upload"
destination = "/var/www/video1/assetsIN"
nameconflict="overwrite"
filefield="video" />
</cfthread>
Thanks for any help.
UPDATE: I asked Ben Forta this in an email yesterday and here
was his response:
What you are doing is correct. The actual file processing
(getting the uploaded file) will not happen in a separate thread.
Were you expecting a separate thread for the upload itself? CF
can’t do that for you s CF does not have the file until it is
uploaded. Actually, CF is not even called until the form is
submitted (which includes the file being uploaded). It sounds like
you want the browser to do an upload in the background. This may be
doable using JavaScript and Ajax type controls. Or maybe using
browser tabs or something. -Ben

With file uploads the time consumption is between the client
PC and the web
server, not the web server and the CF server (which are
usually on the same
machine). All <cffile action="upload"> does is copy the
uploaded file from
the web server's temp upload dir to [wherever you tell it to
go]: it's a
local process, and should be fairly quick; certainly compared
to the
process of getting it to the web server in the first place.
Even if the data transmission was between the client PC and
the CF server,
you can't expect <cfthread> to somehow increase the
bandwitdh and speed up
the file upload between the two machines.
<cfthread> could come into its own if you had some file
processing to
perform on the file *after* it's uploaded: unzipping it,
doing some image
manipulation, parsing a CSV file into a DB, that sort of
thing. Not for
the initial upload.
Adam

Similar Messages

  • Using mod_alias in combination with dispatcher

    Hi all,
    In the example dispatcher configuration there is a setting called DispatcherDeclineRoot which has a comment saying: if turned to 1, request to / are not handled by the dispatcher, use the mod_alias then for the correct mapping.  Can anyone explain how to use mod_alias in combination with the dispatcher module?  For example, how can I configure it to serve static content for a specific alias and go to CQ for other requests?  Can someone provide an example configuration?
    Many thanks,
    Jan

    Hi,
    It still doesn't quite work the way I want it to...  Indeed, when you deny it in the dispatcher config, apache is trying to serve it.  However, apache is looking for the file under /var/www/html which is the docroot configured in the dispatcher config.  But my files are somewhere else, and there's an Alias defined for this in my apache config file.  For some reason apache is not using this alias definition, the dispatcher docroot setting seems to be taking precedence.  I tried several of the dispatcher settings (like DispatcherDeclineRoot and DispatcherUseProcessedURL) but to no avail.  The reason why I'm not just putting my static files under /var/www/html is because I don't want them to get mixed up with the CQ cache.  I want to be able to clear everything in the cache without touching these files I want to serve statically. 
    Any thoughts?
    Regards,
    Jabn

  • How do I use Edge Web Fonts with Muse?

    How do I use Edge Web Fonts with Muse - is it an update to load, a stand alone, how does it interface with Muse? I've updated to CC but have no info on this.

    Hello,
    Is there a reason why you want to use Edge Web Fonts with Adobe Muse?
    Assuming you wish to improve typography of your web pages, you should know that Muse is fully integrated with Typekit. This allows you to access and apply over 500 web fonts from within Muse. Here's how you do it:
    Select a text component within Muse, and click the Text drop-down.
    Select Add Web Fonts option, to pop-open the Add Web Fonts dialog.
    Browse and apply fonts per your design needs.
    Muse also allows you to create paragraph styles that you can save and apply to chunks of text, a la InDesign. Watch this video for more information: http://tv.adobe.com/watch/muse-feature-tour/using-typekit-with-adobe-muse/
    Also take a look at these help files to see if they help you:
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-1.html
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-2.html
    http://helpx.adobe.com/muse/tutorials/typography-muse-part-3.html
    Hope this helps!
    Regards,
    Suhas Yogin

  • How do I use Qt and OpenGL with Visual Studio

    Hi! I mainly want to program in C++ and I want to use Qt and OpenGL with Visual Studio.
    I am currently revising C++ and later on i am going to start reading Qt and OpenGL. I have a background of
    Embedded firmware design(C and Assembly).
    The Visual Studio Version I have is 2013 ultimate. How do I use Qt and OpenGL with Visual Studio?
    Thanks
    Alexandros

    Hi ClassicalGuitar,
    The forum supports VS setup and installation. And your issue is not about the forum. I will move the thread to off-topic forum. Thanks for your understanding.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • How do i use my mac book with my HP 6510 e all in one series printer

    how do i use my mac book with HP photosmart 6510 e all in one series

    Hello Marilynatsea,
    Thanks for using Apple Support Communities.
    To learn more about printing in OS X on your Mac, and how to add a printer, take a look at the article linked to below.
    Mac Basics: Printing in OS X - Apple Support
    Cheers,
    Alex H.

  • How do I use my gigaware webcam with my mac?

    How do I use my gigaware webcam with my mac? I just bought this webcam on amazon http://www.amazon.com/gp/product/B00IJE0ISS/ref=oh_aui_detailpage_o07_s00?ie=UTF 8&psc=1 and I want to use it with my mac. Is there an adapter or any software to make it compatible? Thanks.

    Your amazon link states, in part, that this webcam is:
    Compatible with Microsoft Windows 7,Vista, XP, 2000
    Use a Mac OS X Compatible Webcam like one of those shown in the linked article instead.
    For best compatibility and security, also update your OS X Mavericks (10.9.2) to the current OS X version by restarting Mac and then downloading and installing OS X Mavericks 10.9.4 Update (Combo).

  • How do I use a foot pedal with my mac?

    how do I use a foot pedal with my mac to use on YouTube?

    Can you be more specific? What kind of foot pedal? What is the foot pedal used for?

  • How do i use a new computer with my ipod?

    how do i use a new computer with my ipod?

    See this apple support communities user tip…
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • How do I use cell number associated with iPad 2 3G

    How do I use cell number associated with iPad 2 3G

    For Messages you can can use your email address, the iPad doesn't have a phone number that you can use.

  • How do i use 2 ipod touches with 1 itunes account?

    how do i use 2 ipod touches with 1 itunes account?  can they share apps and music etc. I'm not very good at any tech so advise would be much appreciated.

    Yes. You can sync an unlimited number of iDvies that you control to one iTunes library/account. If using the same iTunes library on the same comutr just make sure that yu go to the ap. music and other pane for the iPod in iTunes and select sycn selected items. Not the the whole library.  That way each iPod can have it own contents.

  • How do I use a regular printer with my iPhone?

    How do I use a regular printer with my iPhone?

    you can't unless it's an AirPrint enabled printer or you purchase a 3rd party app like printopia.

  • How do I use a bluetooth headset with garageband?

    How do I use a bluetooth headset with garageband? I can't get it to work after many tries.

    I can pair the headphones with the computer but the sound from GB is distorted and muffled. I can barely hear it. The set works with iTunes, but not with GarageBand.

  • How do i use my Platronix bluetooth with iPhone 4 to listen to music.

    How do i use my Platronix bluetooth with iPhone4 to listen to music.
    Its a mono bluetooth paired with the phone.
    I dont want to buy a new stereo headset but can i use this same one.

    One way is to sync the contacts from the old iPhone to iCloud. Then when you turn on the new phone and set it up for iCloud and turn on the Contacts in Settings >iCloud, they will come to the new phone. http://www.apple.com/icloud/setup/

  • How do i use my apple id with ichat?

    how do i use my apple id with ichat?

    Hi,
    Only @Mac.com and MobileMe Apple IDs are valid AIM names as well  (And the Passwords need to be 16 characters of Less - AIM end Issue).
    If you have any other form of Apple ID then you will need to register for either an @mac.com name  or create an AIM one.
    NOTE The @Mac.com Registration requires you link an active Email to the @Mac.com name.
    THIS CANNOT BE an Email address you have used for an Apple ID already.
    The AIM Registration asks for Email address for Security and Password Recovery and is not Hard Linked in the same way (you could use the same email to set up multiple accounts/Screen Names)
    To state things another way:-
    A MobileMe ID is an Email address.
    It is an Apple ID and will work in those places it is supposed to, iTunes, Apple Support Communities (with Alias set up), Face Time (With Registration) Apple On-Line Store, Mac App Store.
    It is a Vlaid AIM NAme as well (If the password is kept to 16 characters or less).
    @mac.com names are Apple IDs with the same access as above.
    It is a Valid AIM Screen Name.
    If it was registered before MobileMe started it maybe linked to a Current MobileMe account as a valid Email.
    A Current Registration is purposely for iChat use and Requires a Non Apple current Email that is NOT linked to any other Apple ID
    Any other name or Email used to create an Apple ID is not an Email with/through Apple.
    It is NOT a valid AIM screen Name.
    It is only an Apple ID that allows access to the places listed above.
    If it is an email this cannot be used to Register with @mac.com
    I hope this is clear.
    8:18 PM      Saturday; July 2, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How do i use an external display with my macbook pro?

    How do I use an external display with a macbook pro?

    Just buy the proper adapter cord, such as MiniDisplay port to HDMI for example.  Plug it in and it will be automatically recognized.  Use System Preferences > Displays to set options.
    The display can Mirror your primary desktop or Extend the Desktop.
    Regards,
    Captfred

Maybe you are looking for

  • Windows 7 Crashes/Freezes when playing ANY Video files

    lets see can anyone get their head around this one as it is driving me round the bend.  So... I have a media centre PC connected to my HDTV by VGA cable. I ran the PC on XP for a long time but last December, I upgraded it to Windows 7 along with my l

  • Mapping with reference pixel

    Hi,     I am attaching an encrypted image.In this image the pixel containing the value 255 is the line reference pixel.That is i need to map the first 255 at 0,0 and the next 255 at 1,1501 and so on.Most importantly if the difference between 2 succuc

  • List box is not scrolling to the last item

    Hello all, I am developing a Windows Phone 8 application, in that I am using List box to display the data. I have requirement like once the page is launched user should navigate to the last item of the list box. For this requirement used scroolintovi

  • Connect bluethoot Iphone 3gs to ipad - 4.3 version

    is possible connect iphone 3gs to ipad using bluethoot connection, for go in internet without wi-fi? i've downloaded 4.3 version, yesterday

  • Validation for BAPI for transaction FV70 and FV75

    Hi all, Can any1 tell me Validation BAPIs for T-Codes FV70 and FV75. Please bear the following points 1. The BAPI should NOT create Parked Customer Invoices, they should just validate that the data to create the customer invoice. 2. The Transaction a