Folks-

I added a number of extensions to the allowable attachments in Drupal. For some reason, whenever .vsd (Visio) files are downloaded that had been previously successfully uploaded, the ".vsd" extension is truncated and the file downloads with no extension. For example, a file residing on the drupal server called "diagram.vsd" appears on the desktop as "diagram" .

Anyone have any ideas? This may not seem like a big deal but it will undoubtedly confuse some users.

Comments

rszrama’s picture

I run into a similar problem with an application I developed for a company that created and download .qwc files for the QuickBooks Web Connector. The issue wasn't with the application but with the browser... (in this case IE). Would this be true of you? In the actual file system is it being stored and linked to with the extension but just downloaded wrongly?

sarahr’s picture

Yes, it's being stored correctly (i.e. as "diagram.vsd"). The odd thing is that the file is stripped of its extension under multiple browsers; I use Firefox and a colleague uses IE and it happens in both cases. Could it be a function of something on the server side (which, incidentally, is Windows XP/xampp)?

Thanks for your response.

mcupples’s picture

I had the same problem (sort of) with an .rdp (Remote Desktop) file. To fix it, I linked the button to this file, also passing in the var rdp with a value of yes (just in case):

$file="[FILENAME]";
if ($rdp=="yes") {
 header('Pragma: anytextexeptno-cache', true);
 header('Content-type: application/force-download');
 header('Content-Transfer-Encoding: Binary');
 header('Content-length: '.filesize($file));
 header('Content-disposition: attachment; filename='.basename($file));
} else {
 print("No file with this name for download.");
}

I'd imagine it would work the same for your file. Try it out.

alynner’s picture

In response to rszrama's comment -

I have a client that would like quickbooks integrated with their e-commerce site, can you give me any insite as to the application you developed for .qwc files? I know a fair amount about php and xml, but I don't know the first thing about Quickbooks!

rszrama’s picture

Alynn, if you want to just send me an email through my contact form, I'd be happy to discuss the application. I have a working application and some model code I can pass onto you developed in PHP4/5 + NuSOAP. I can send you the server's core code (to define the web service) as well as an example .qwc file and a class I created that constructs qbXML for various import requests. I had some issues using the latest beta of the Web Connector, but the previously released one works fine... the problem is that Intuit's stuff is just buggy. Accept that before ever starting and you won't be disappointed. ; ) Seriously, bugs seem to be a feature of the Web Connector.

alynner’s picture

Thanks for the offer, that would be wonderful. I sent you a contact through the form, let me know when you have time to respond.

cheers
alynner

fil’s picture

Dear rszrama,

Can you give me links with examples? i want to start my own project of quickbooks integration but unfortunately i do not know how to start. Please give me some info.

many thanks.