Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7404383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:14:54+00:00 2026-05-29T05:14:54+00:00

I have a problem with an attachment’s name. When I call the site on

  • 0

I have a problem with an attachment’s name. When I call the site on google chrome it returns the file with the right name and extension. I tested it with internet explorer and it works fine too. The issue lies with only Firefox. I call the site and it returns the first word on the file title and no extension.

For example if I wanted a file called “My report.docx” it turns a file called “My”. I Googled around and it turns out this is a common issue with people because browsers read the headers differently. They said the fix is to quote the file name:

Content-Disposition: attachment; filename=My Report.docx

is now: (note the quotes)

Content-Disposition: attachment; filename="My Report.docx"

However, that did not work for me.

On chrome it returned “My Report.docx” (actually with the quotes). Firefox returned a odd file that had the proper extension and proper name and no quotes yet it could not be executed. It was the proper file size, proper extension, and proper name yet it could not be executed. Also it returns a space before and after the file name.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:14:54+00:00Added an answer on May 29, 2026 at 5:14 am

    This should work as expected, here’s another SOq with the same problem:

    • Downloading a file with a different name to the stored name

    and also the Mozilla page (I guess you were referencing this one):

    • http://kb.mozillazine.org/Filenames_with_spaces_are_truncated_upon_download

    I don’t know the specifics of your server side code, but here are some things to confirm / try:

    • If you have PHP available at the server, can you try the code from the first link above? If not, you can probably find something on the Net in your language of choice. That way, you can confirm whether the issue is in your code or somewhere else (server setup, browser, etc.)
    • Is this happening on other client machines (i.e. where you try the download from) or only on that one? You might want to try others to confirm.
    • Is this working fine in IE / Safari or some other browser? You can even try doing it with wget or curl from the command line or something like that.
    • Are you also providing the Content-Type header correctly?
    • Can you try downloading some other file or a file of a different type, e.g. a .png or a .xls? In fact, probably the easiest would be to try a plain text file (text/plain) and then take it from there.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now i fixed the filtering of file extension but i have a problem on
I have problem while i try to send email with attachment file, i just
I have a problem. I should receive attachment parameters, but with a point it
I have the following if statement if (isset($part->disposition) and ($part->disposition=='attachment')) Problem is the second
I have a problem in PHP. I am using <input type=file> to get the
I have a PHP file that serves up a file, but the problem is
Problem with german umlauts in generated CSV file using Grails Hi, I have a
i have one problem I save my upload data in the blob file type
I have rather weird problem with paperclip gem. You know it defines Attachment class
I have the following code running on my site. The only problem I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.