Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / November 2006



Tip: Looking for answers? Try searching our database.

CFFILE Upload question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Remmuh - 19 Sep 2006 20:40 GMT
I have a question and I believe I know the answer but I want to ping all of you
to see what you say. I am developing an application using Mach-II. I would like
to upload a file. I have no problem seeing the filefield in my listener.
Technically I could just process the cffile action="upload" right there in the
listener, but instead I would like to stick to convention and upload it in my
FileService component instead. Is there a way of passing the form file field to
the service and then processing the upload?

I have a feeling based on the way that CFFILE is built this is not possible.
Please advise. I will be happy to resolve any confusion my message may have.
hatethisnamegame - 19 Sep 2006 22:47 GMT
Don't know about Mach II but passing to a cfc is as follows:
<cfinvoke component="somecfc" method="fileUpLoad" fileField="nameOfFileInput">

The value passed in the fileField variable is the actual name of the input
type="file"
Remmuh - 19 Sep 2006 22:49 GMT
I keep getting "backupDoc" does not contain a file, yet when I dump it, it displays the location to the temporary file. Then I have also run a FileExists on it and it does exist.
Abinidi - 20 Sep 2006 16:22 GMT
Post your code and we can see if we see something
Remmuh - 20 Sep 2006 16:37 GMT
My question has been answered by Brian Rinaldi over at Remote Synthesis
(http://www.remotesynthesis.com/blog). He wrote an article on how to deal with
uploads via Model-Glue. He was able to clarify his post for me and now I
understand what you have to do.

What it comes down to is that you have to submit the name of the fileField in
a hidden input field (for lack of a better way at this time) and pass that
through your methods rather than the value of your fileField.
shaunperry - 29 Nov 2006 21:43 GMT
Hi

I m having trouble with a similar project. Could you explain a bit further about the hidden input fields?

regards

shaun
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.