Can you add a .json file to the file download area?
djangofan opened this issue · 5 comments
Can you add a .json file to the file download area?
I want to be able to trigger a save-as dialog from IE. Anything of content type 'application/whatever' would work I think.
If you upload one through the form on http://the-internet.herokuapp.com/upload it will show up on the downloads page.
I'm thinking about adding some other files to the download area so there's some boilerplate stuff. I'll consider adding a default JSON file to the mix. For now the best option is to use the upload form.
Will tackle this as part of #20
I noticed the response header on the content type for my .json file i uploaded was application/octet-stream . Perhaps that could change. Thanks for providing a way to upload... i just didn't expect to be able to do that. Pretty cool.
Welcome to the future! The application/octet-stream is a catchall I put in place. I'd obviously want to amend that to include the correct MIME Type.
https://github.com/tourdedave/the-internet/blob/master/server.rb#L78-L79