Suggestion: mime-type on bin download

It would be very nice if you folks could use a specific (known) mimetype on download. As this lets us add mime-handlers to our browsers which automagically can download/move it to the right mounted MBed (and perhaps clearing off some old versions first).

As doing things like changing the default download location gets tired fast.

Thanks,

Dw

21 Jul 2010

Hi Dirk,

Adding a mime-type certainly seems a good idea. Just to warn you, you'd be surprised (or maybe not) how hard it is to get a file of this type to consistently download across all browsers and all platforms! So we'll have to do a lot of regression testing to check we're happy, but will look to do it.

Which browser are you using to set the handlers btw, so we can test the whole process to ensure your desired result can be made to work?

Simon

Basically - that does not matter much. Anything like application/* or any of the data types is fine. As long as it is somewhat unique (and has the usual disposition fields).

On the users end a simple shell script or *.BAT file along the lines below then takes care of it.

Dw.

 

#!/bin/sh

if [ $# != 2 ]; then echo Syntax: $0 file 1>&2; exit 1; fi

DIR=$1

FILE=$2

set `file "$DIR/$FILE" || echo unknown`

[ x-$1 eq 'x-mbed-bin' ] || exit 0

rm -f /Volumes/MBED/*.bin

mv "$DIR/$FILE" /Volumes/MBED || exit 1

growlnotify "$FILE copied to Mbed - one can press reset"

exit 0