Actually double quotes are ok too (probably preferable), as per the
example in the spec:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html

You'd need to escape the double quotes: ""some file.etx""

Some sort of quote is necessary in any case, as the spec states that a
quoted string is expected for the filename:

-----
        content-disposition = "Content-Disposition" ":"
                              disposition-type *( ";" disposition-parm )
        disposition-type = "attachment" | disp-extension-token
        disposition-parm = filename-parm | disp-extension-parm
        filename-parm = "filename" "=" quoted-string
        disp-extension-token = token
        disp-extension-parm = token "=" ( token | quoted-string )

An example is

        Content-Disposition: attachment; filename="fname.ext"
-----

On 7/19/07, Ben Nadel <[EMAIL PROTECTED]> wrote:
> Try wrapping the filename in single quotes:
>
> <cfheader name="Content-Disposition"
> value="attachment;filename='#fileName#'">
>
>
> ......................
> Ben Nadel
> Certified Advanced ColdFusion MX7 Developer
> www.bennadel.com
>
> Need ColdFusion Help?
> www.bennadel.com/ask-ben/
>
> -----Original Message-----
> From: Dave Francis [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 18, 2007 1:23 PM
> To: CF-Talk
> Subject: cfheader filename problem
>
> Hi,
>
>             I'm trying to download files with this:
>
>
>
> <cfheader name="Content-Disposition"
> value="attachment;filename=#fileName#">
>
> <cfcontent FILE="#file#" TYPE="#MimeType#">
>
>
>
>             Whenever the filename contains spaces, the "What do you want
> to do with this file" prompt truncates the filename. I can obviously
> replace the spaces with underscore, %20 or something, but wondered if
> there was a way to preserve the filename as is, and get the full name in
> the prompt?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284059
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to