Hello,

I have been working on a problem with my site for a few weeks now and I am at my wits end.

Most pages on my site have a pdf attachment. Whenever a user clicks on the attachment in IE 7, instead of just opening as it should, a dialog box opens that says:

"Do you want to save this file?"
Name index.pdf (this is not the name of the file)
"The file you are downloading cannot be opened by the default program. it is either corrupt or has an incorrect file type. As a security precaution, it is recommended that you cancel the download."

If i download the pdf, it will open ok. so they are not corrupt

In Firefox the pdf opens as it should, but it is named "index.php (application/pdf Object)"

In IE 6 a new window opens, but the pdf never loads.

Unfortunatly, I did not deal with this problem when it began because i thought it was just my browser. So I don't know what I may have done to make this happen (It was not always like this).

I am running Drupal 5.7 on IIS 6 Windows 2003.

Any help would be greatly appreciated, I am delaying the launch of my site.

Comments

bander2’s picture

Component: base system » file system

OK, I figured something out. I have the file system set to private, it is a secure site and I want to know who downloads what. But, If i change file system to public, the files open properly.

So i moved this to the file system section. Can anyone point me to what exactly is being envoked when accessing files through Drupal? That is where my problem is.

Thanks

bander2’s picture

Anybody?

I have no ideas. The slightest hint might help.

bander2’s picture

Am I right in thinking that if file downloads work when accessed publicly, but not privatly, then I have ruled out my PHP installation and IIS as the possible culprits? Then the issue must be with Drupal?

Stol’s picture

Title: Problems downloading and opening files » Problems with private download method and filenames
Category: support » bug

I have two sites using the private download method. They were running fine until the last update to Drupal 5.7

When I download a file, Firefox thinks it's a partial download and give it some random name + the .part extension. Konqueror (I think also Safari) use the site name as filename. I both cases, when I rename the file after downloading, I can open it. So the file itself is ok.

My sites that are using the public download method don't have this issue.

Stol

Stol’s picture

Priority: Critical » Normal

critical -> normal

Stol’s picture

My problems went away after updating the filefield module to "filefield 5.x-2.3".

For me, this issue is closed.

Cheers
Stol

A2E’s picture

Version: 5.7 » 6.10
Issue tags: +private filefield cck public

I'm not using CCK. So for me, the problem has most deifnetly not gone away.
Are you saying the only way to get Private to work right is to use CCK?!
What if I don't want to use CCK?
Private is part of the core, it should work well with core only.

terramedia’s picture

Version: 6.10 » 6.14

I am also having this problem on a site running on IIS (full details at http://drupal.org/node/600872 ), I have tested the site and database on an Apache server with no issue, it seems to only present itself on the IIS server (which unfortunately, the site has to run on), could IIS have something to do with it? Perhaps there is something in the web.config that we need to set?

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.