Gadgets download

Yesturday, I noticed about interesting problem – how to make download gadget. Seemed stupid? No. Try to upload your gadget to any web server (it might be even apache). While you’ll try to download it you’ll get following in IE and FF. What’s the hell? Why it’s ZIP??? I uploaded .Gadget!

 

You see .ZIP extention just because .Gadget is really .ZIP, so “smart” IE knows to “translate” extention in order to prevent fraud. Very nice, but I want do download and install gadget. As like as I can do in in http://gallery.live.com

How to configure my server to do it. Simple answer is right MIME type. It’s application and it’s zipped, so we can use  application/octet-stream, application/x-compressed or even application/x-msdownload. Let’s try. Just register .gadget type with one of those. In first case you’ll get octet stream :) Obviously. And this looks like that

Bad one. The next x-compressed will return us to previouse state with .ZIP renaming. Let’s see what will be with x-msdownload.

You able to download gadget as requested, but you can not install it (Open->Run) from the web (like in Live.Gallery)

So such thing is not suitable for us. After some digs of my friends from Redmond (from Live team – they are only 3 :) ) I found it. The right MIME type for Vista SideBar Gadget is application/x-windows-gadget. Register .gadget extention with application/x-windows-gadget MIME type and you’ll able to provide your visitors Live.Gallery like installation option for gadgets

Yossi, do it here for us as well :)

Have a nice gadget :)

11 Responses to “Gadgets download”

  1. manish jain Says:

    i’ve gadget files but don’t know how to open them. thanks to u now i can open them

  2. manish Says:

    lets see what’s the gadget is

  3. Ulrik Says:

    How do you set the MIME-type?

  4. Tamir Khason Says:

    It will never installs automatically. It’s always asks user to approve an installation be design.

  5. Mike Says:

    Now it is downloading as a gadget file but it isn’t automatically installing.

  6. Mike Says:

    I registered

    .gadget

    application/x-windows-gadget

    and it still tries to download .zip

  7. Joung Sik You Says:

    Thank you very much!!

    You are so wonderful!!

  8. Kevin De Angelis Says:

    You’re a life saver! Worked perfect! THANK YOU!

  9. Tamir Khason Says:

    You are welcome

  10. Marco Says:

    Thanks for the info. I searched the web for this and I found only this article. I added the mime type to my apache server and it works like a charm.

  11. rachat crédit Says:

    I agree with most of your points, however a few need to be discussed further, I will hold a small talk with my buddies and maybe I will ask you some advice shortly.

    - Henry

Leave a Reply

Recommended

 


Sponsor


Partners

WPF Disciples
Dreamhost
Code Project
Switched to Better Place

Together