This is a problem I've been struggling with for a few weeks now, but can't seem to find a viable solution. In a nut shell, my program goes to a website and downloads a handful of files. When it goes to download a file, FireFox always displays the popup asking where I want to save it to. In an attempt to get rid of this popup, I created a profile preference.
profile.setPreference("browser.helperApps.neverAsk.saveToDisk","application/zip,application/vnd.ms-excel");
This preference works great with the one zip file I need to download, but it's completely ignored for the other 3 Microsoft CSV files that I need. I have tried every applicable mime type I can think of and none of them work. I ran my file through an online program that is supposed to tell you what mime type the file is, and it proclaimed the file I tested was a application/vnd.ms-excel
. Unfortunately though, I have never been able to get this type to work. I have tried various different ways of setting up the profile, such as:
profile.setPreference("browser.helperApps.neverAsk.saveToDisk","application/zip" + "application/vnd.ms-excel");
And even just using application/vnd.ms-excel
without the zip
type in front of it, and still no dice. Is there another way to set this up to where I don't have that window popup each time I try and download these files? Better yet, is there something wrong with my code that would allow the zip file to work, but not the Microsoft csv?