Professional Web Applications Themes

Saving file to user desk top - Coldfusion - Advanced Techniques

I am generating .csv file from custom tag and sending this to user as an attachment. but due to size of this .csv file some time it is becoming a big issue while sending email Now I am looking for alternative to Force Download of File, Is there any way without asking for download option we can save file to user desk top (file is already there are server) I used this <cfset FileName="QueryResult.csv"> <cfcontent type="text/csv"> <cfheader name="Content-Disposition" value="attachment;filename=#FileName#"> <cfheader name="Content-Description" value="This is a cama-delimited file."> <cflocation url="<path-to-file>/#FileName#"> above code is downloading the file but Downloading should be automatic, it ...

  1. #1

    Default Saving file to user desk top

    I am generating .csv file from custom tag and sending this to user as an
    attachment. but due to size of this .csv file some time it is becoming a big
    issue while sending email

    Now I am looking for alternative to Force Download of File, Is there any way
    without asking for download option we can save file to user desk top (file is
    already there are server)

    I used this

    <cfset FileName="QueryResult.csv">
    <cfcontent type="text/csv">
    <cfheader name="Content-Disposition" value="attachment;filename=#FileName#">
    <cfheader name="Content-Description" value="This is a cama-delimited file.">
    <cflocation url="<path-to-file>/#FileName#">
    above code is downloading the file but
    Downloading should be automatic, it should not force user to download/save..
    my code should move file from server to user desktop

    Any you please help appreciated


    john_Cf Guest

  2. #2

    Default Re: Saving file to user desk top

    You cannot do that as it breaches browser security. I know you have only good
    intentions but if this were possible, it would not be safe to go on the
    internet.

    Browsers are very powerful pieces of software and will not let you do this.

    Stressed_Simon Guest

  3. #3

    Default Re: Saving file to user desk top

    A good work around would be to generate the file on the server, and provide the
    user with a link to download it. Then perhaps after a couple hours (or another
    set amount of time you think is best) delete the file from the server. This
    allows the user to save the file from the web server like they would anything
    else, and prevents you from having to email the file itself.

    You could also generate an email that contains a link to the file on the web
    server.

    Robert10 Guest

Similar Threads

  1. Saving user input to xml
    By Beatie3 in forum Macromedia Flash Data Integration
    Replies: 2
    Last Post: May 23rd, 10:51 PM
  2. Desk top to server
    By isbno in forum Macromedia Flash Data Integration
    Replies: 1
    Last Post: February 12th, 04:58 PM
  3. User defined property saving problem
    By Alexandru Gurau via .NET 247 in forum ASP.NET Building Controls
    Replies: 1
    Last Post: April 28th, 12:47 AM
  4. Saving user names and passwords?
    By Jeff Waddell in forum Windows Networking
    Replies: 0
    Last Post: July 11th, 11:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139