Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
etman #1
cffile + Win IE issues
I've built a form where the visitor inputs a bit of copy into a text area,
answers a couple of questions, browses their computer for an image to upload,
then hits submit. The data goes into a MySQL db and the image should be written
to a particular directory on the server. Now, I've tested this on several
browsers on both Mac and Windows platforms and it works perfectly except for a
Windows computer (XP and 2000) running IE. Of course I've been told by the
hosting company that they've got the latest patches so it can't be them. The
site is being hosted on a UNIX computer running CF MX. Any thoughts what could
be causing this or how I could fix it? I don't have administrative access to
the CF server and the form uses <cffile> to perform the file upload. Thanks in
advance, Rob
etman Guest
-
CFFILE ISSUES
Cant write new files with cffile without leaving first line blank!! I am trying to write an application that would read data from a database into... -
cffile with flv
I need to set the file to allow uploading of an flv file into an Access database. How do I do this. I know it's using the accept parameter, but what... -
USING CFFILE
I am appending data from query to text file.The number of records appended approximately are about 35000 records.I wrote the code in the format... -
need help with cffile
I am having some trouble with cffile - i am trying to uplaoad a few files in a form and rename them to be inserted into the database - the problem... -
CFFILE on PC and Mac
So I've been looking at the suggested solution mentioned by Fug. It looks like it might work, but it is 400+ lines of code and will take a bit of... -
Mike Greider #2
Re: cffile + Win IE issues
Is the form field value different on IE than the other browsers? Anything in the log files? I'm assuming that the directory is the same for all of the browsers/OS right?
Mike Greider Guest
-
Fug #3
Re: cffile + Win IE issues
Other things to look at in addition to Mikes advice:
1. Is it a specific computer/s having the problem (I know you said a Win2K/XP
system, but are there other Win2K/XP systems you've tested on that work fine,
or is it every Win2K/XP system you've tested has the problem?)
2. Is the page generating an error (and if so, what is it) or does it appear
to work, even though the file has not been uploaded?
Fug Guest
-
etman #4
Re: cffile + Win IE issues
Well, here's what I've found so far: The site works for every other browser
and OS that I've been able to test - EXCEPT for Windows (I've only tested XP)
running IE. I've also been able to narrow it down to the property call
(withing the <cffile> tag) to #cffile.serverFile#; or any other property call
within <cffile>. I've tried moving the #cffile.serverFile# property call to
different parts of the page and I'll get a CF error thrown that says that
#cffile.serverFile# is undefined - it's as though it tries to query the server
before the file has been uploaded. The reason I'm calling #cffile.serverFile#
is because I'm trying to add the file name that's been uploaded to the server
into a db so I can relate the to at a later date. Very odd...
etman Guest
-
etman #5
Re: cffile + Win IE issues
Found it. When specifying the image types to allow within the <cffile> tag,
here's what I put: <cffile action='upload' fileField='upload'
destination='#ContentImagesDestination#' nameConflict='makeunique'
accept='image/jpg, image/jpeg'> However, the accept= should have been:
<cffile action='upload' fileField='upload'
destination='#ContentImagesDestination#' nameConflict='makeunique'
accept='image/*'> I was trying to limit what could be uploaded to JPGs only -
but for some reason IE on a Win box is a bully and seems to not like being
limited to a specific file extension; only a file type. I hope this helps
someone else that may run into this problem...
etman Guest
-
Cory P. #6
Re: CFC accessor method inserting carriage returns
Further updates - the database interaction is irrelevant. The following also
produces the carriage return when calling an accessor method to obtain the data
within CFOUTPUT. Also the CFPROESSINGDIRECTIVE tag used to suppress white
space does not help.
<cfscript>
myuserBean = createObject("component",
"#COMPONENT_URL#.gov.nasa.user_bean");
myuserBean.setFirstName("Cory");
myuserBean.setLastName("Phillips");
</cfscript>
View HTML source to see the results.
<cfoutput>
Before[#myuserBean.getLastName()#]After
</cfoutput>
--------- Result -------
Before[
Phillips]After
Cory P. Guest
-
philh #7
Re: How to make programmatically entry in IIS
Hitesh, You can use WMI through scripting to manipulate IIS objects and
properties. See
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/html/01c[/url]
2ecf3-01d6-44d3-889b-339542d3339c.asp for details.
philh Guest
-
Kronin555 #8
Re: CFC accessor method inserting carriage returns
Add output="No" to this line:
<cffunction name="getLastName" returntype="string" access="public">
making it:
<cffunction name="getLastName" returntype="string" access="public" output="no">
This flag indicates whether output from this function is to be processed as
HTML or hidden as if the function ran in the body of a <cfsilent> tag.
Kronin555 Guest
-
Cory P. #9
Re: CFC accessor method inserting carriage returns
Thanks Kronin. That fixed it.
Cory P. Guest
-
Mike Greider #10
Re: cffile + Win IE issues
That's an interesting find. Thanks for the update.
Mike Greider Guest



Reply With Quote

