[prev in list] [next in list] [prev in thread] [next in thread] 

List:       olpc-sugar
Subject:    Re: [Sugar-devel] Journal and filenames on USB disks - more
From:       Martin Langhoff <martin.langhoff () gmail ! com>
Date:       2009-06-30 18:16:25
Message-ID: 46a038f90906301116j6c4b84f0y60990fd35172a5c8 () mail ! gmail ! com
[Download RAW message or body]

On Tue, Jun 30, 2009 at 7:41 PM, Martin
Langhoff<martin.langhoff@gmail.com> wrote:
> Rename and copy

From the department of useful tricks...

If you want to preserve your users' ability to name a file you serve
via HTTP, eschew proper mimetypes and say with me:

    Content-Type: application/x-forcedownload

With that mimetype, the "rename and copy" strategy works.

> Is there a better way to do this?

At first blush it doesn't qualify as 'better', but this particular
file is not meant to be read or edited by the end user (as it's
Canonical JSON). So serving it text/plain was a liability, as the
Journal would happily open it under Write.xo . So yes, we are better
off with it.

Maybe application/json-don't-edit-me would be more appropriate.

cheers,


m
-- 
 martin.langhoff@gmail.com
 martin@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic