/    Sign up×
Community /Pin to ProfileBookmark

Force file download – Windows Mobile 5.0

Hi Y’all,
Looking to create a simple page to distribute a file to Windows Mobile 5.0 devices. Problem is, the file name “root.cer” causes the file to be displayed not downloaded. Asking users to rename the file is not an option with my users. I tried pointing to an FTP site but cannot get that to work either.

<a href=”ftp://192.168.1.129/root.cer”>Company certificate file – click to install</a></p>

<a href=”downloads/root.cer”>Company certificate file – click to install</a></p>

Any ideas where to find out how to force the file to download and not be displayed?

Thanks!
Rich

to post a comment
HTML

12 Comments(s)

Copy linkTweet thisAlerts:
@KDLANov 08.2006 — Why don't you put it in a Winzip file? They'll download that, then upload the file to their device.

KDLA
Copy linkTweet thisAlerts:
@gitrdoneauthorNov 08.2006 — Thanks for the suggestion. I am trying to get the files to the PDA's without the user having to cradle thier PC or deal with activesync, in other words in the field. If they can download directly to the device from the web it would be easy. I can download a zip file like that, but then they have no way to unzip it. Renaming in windows mobile does not seem that easy either, so I am looking to get the html to maybe set the object type as download only if there is such a method (or whatever you coder type would call it ? )
Copy linkTweet thisAlerts:
@KDLANov 08.2006 — That would probably have to be done with server-side coding.... sorry, I'm not an expert at that.
Copy linkTweet thisAlerts:
@gitrdoneauthorNov 08.2006 — Thats OK, I will mark as resolved anyway, we will just go with plan a.
Copy linkTweet thisAlerts:
@NogDogNov 08.2006 — If on a server running Apache, you could include the following in a .htaccess file in the directory with the .cer file(s):

.htaccess:
<i>
</i>&lt;Files *.cer&gt;
ForceType application/octet-stream
Header set Content-Disposition attachment
&lt;/Files&gt;
Copy linkTweet thisAlerts:
@gitrdoneauthorNov 08.2006 — Let me fire up apache and give it a try.
Copy linkTweet thisAlerts:
@gitrdoneauthorNov 08.2006 — NDOG,

I tried this on Fedora Core 5 w/ apache. Created the .htaccess as above file and even using firefox as a browser, the default action is to display the file. Any words of wisdom?
Copy linkTweet thisAlerts:
@gitrdoneauthorNov 08.2006 — NDOG, also changed "AllowOverride" to "All" in httpd.conf and restarted apache...
Copy linkTweet thisAlerts:
@gitrdoneauthorNov 08.2006 — My bad - its working from windows mobile! WHoo Hoo - you rock NogDog!!
Copy linkTweet thisAlerts:
@NogDogNov 08.2006 — My bad - its working from windows mobile! WHoo Hoo - you rock NogDog!![/QUOTE]
Great! Now I'll quit trying to figure out what I did wrong. ?
Copy linkTweet thisAlerts:
@gitrdoneauthorNov 08.2006 — Doh! Sorry about that. Thanks again. FWIW This really does rock. If you Goog..uh Search The Internet, you will see lots of references and confusion about getting cert on these devices, including freeware, .reg hacks etc. This method is documented no where (but here), and just seems incredibly easy from an admin point of view...it must do something horribly bad somehow! ?


Rich
Copy linkTweet thisAlerts:
@NogDogNov 08.2006 — FWIW, I normally use a PHP servelet to handle this, and the same could be done with ASP, Perl, or most any other scripting language, I'm sure. If you want more info on that approach, I'd suggest posting in the applicalbe server-side forum here. (I find it more dependable, since it will work regardless of the particular web server type/configuration; though of course it requires support for the scripting language used.)
×

Success!

Help @gitrdone spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...