Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How do I stop the response object from renaming files?

How do I stop the response object from renaming files?

Scheduled Pinned Locked Moved ASP.NET
questiondatabasesql-serverhelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Al Ortega
    wrote on last edited by
    #1

    I have an file management tool that has just one problem that I can not figure out. The files are stored in an MsSQL 2005 db and can be retrieved with no problem. The problem comes when the response object renames it. Example if the file is name "file 1.doc" then when the IE response sends it to the client it is renamed "file_1.doc" but FF renames it "File" with no "1" or file extension rendering it useless. Any ideas on what could be causing this and what can be done to stop it?

    -Al

    P 1 Reply Last reply
    0
    • A Al Ortega

      I have an file management tool that has just one problem that I can not figure out. The files are stored in an MsSQL 2005 db and can be retrieved with no problem. The problem comes when the response object renames it. Example if the file is name "file 1.doc" then when the IE response sends it to the client it is renamed "file_1.doc" but FF renames it "File" with no "1" or file extension rendering it useless. Any ideas on what could be causing this and what can be done to stop it?

      -Al

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      Are you setting the filename in the response? Something like: Response.AppendHeader("content-type", "inline;filename=file.doc")

      A 1 Reply Last reply
      0
      • P Paddy Boyd

        Are you setting the filename in the response? Something like: Response.AppendHeader("content-type", "inline;filename=file.doc")

        A Offline
        A Offline
        Al Ortega
        wrote on last edited by
        #3

        no, I have Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name) I tried using inline vice attachment - but there was no difference.

        -Al

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups