Title: RE: [cfaussie] RE: File Upload Prob


Might be a bit obvious, so sorry if you have this already in place, but does your calling <form> tag contain the "encType" attribute?

 

Sarah Atkinson
Global Applications Team Leader
 
Lonely Planet Publications, Aust.
Telephone: +61 3 8379 8000
[EMAIL PROTECTED]

 


-----Original Message-----
From: Adam Chapman [mailto:[EMAIL PROTECTED]]
Sent: Friday, 14 March 2003 8:58 AM
To: CFAussie Mailing List
Subject: [cfaussie] RE: File Upload Prob

Hey Dean,

Steve's syntax looks to be correct although check
That cffile will accept
/usr/local/apache/htdocs/mwc/upload_images/photos
As a path.. (you also should change to backslashes)
I think it has to be a full local path Eg: c:\usr\local\ etc...

Also check that FileExists(Form.upfile) returns true
Otherwise the cffile code wont be run.

Cheers,
Adam

Ps.. You could also de-hash some bits of code just for
Something to do.. ;)

<CFIF trim(Form.upfile) IS NOT "" AND FileExists(Form.upfile)>

<CFSET Form.upfile = File.serverFile>

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Dean
Brandt
Sent: Thursday, 13 March 2003 10:48 PM
To: CFAussie Mailing List
Subject: [cfaussie] File Upload Prob



        Hi Guys

        I am trying to uypload a file to a server using this code:

<!--- START: UPLOAD FILE SECTION // --->
        <!--- If photo is supplied then upload file first --->
        <!--- Check to see if a valid file was specified --->
        <CFIF #Form.upfile# IS NOT "" AND #FileExists(Form.upfile)#>
        <!--- Upload Photo File --->
       
        <CFFILE ACTION=""
        FILEFIELD="#Form.upfile#"
        FILE="#Form.upfile#"
        DESTINATION="/usr/local/apache/htdocs/mwc/upload_images/photos"
        NAMECONFLICT="MAKEUNIQUE"
        ACCEPT="image/gif, image/jpeg, image/pjpeg">
        <CFSET Form.upfile = "#File.serverFile#">
        <CFELSE>
       
        <CFSET Form.upfile = "">
        </CFIF>
       
        <!--- END: UPLOAD FILE SECTION // --->


I can test that #form.upfile# xists, and it does

But the file never ends up in the destination, nor is any error
produced.

Any ideas?

Thanks


Dean Brandt
Clever Thinking Consulting
Network/Systems Integration,
Application Design
Melbourne, Australia
0418488885
...smart networks for smart business


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or 
communicate to others content that is confidential or subject to 
copyright, unless you have the consent of the content owner.


Reply via email to